Skip to content

1597 edit event btn#1688

Open
Shenderaz wants to merge 3 commits intodevelopmentfrom
1597Edit_event_btn
Open

1597 edit event btn#1688
Shenderaz wants to merge 3 commits intodevelopmentfrom
1597Edit_event_btn

Conversation

@Shenderaz
Copy link
Copy Markdown
Contributor

Update events edit button functionality

Fixes #1597

  • During the usability study, participants had a hard time figuring out how to edit the events they had created. They would often try to go back to "create events" to figure out how to edit it because they didn't recognize the event name link as a path to editing the event in "Events List". To accommodate this, an edit event button should be added next to the invite button so they can reach the editing/customizing event information page.

Changes

  • Added an Edit button next to the invite button.
  • Added user's conditions which were missing from the previous PR.
  • Change the URL to the right location which is Edit button.
  • The admin can view and edit button for every event; other users can only view and edit the edit button for their specific events.

Testing

  • As admin, go to events list page, create an event if there is not any, should be able to see the current events available with both invite and edit event button.
image
  • Other users, navigate to the event list page, create an event, should be able to see the events and edit button available for Program managers, otherwise, it will only show the event.
image

Copilot AI review requested due to automatic review settings March 26, 2026 19:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a clearer “Edit Event” affordance on the Events List page to improve event editing discoverability, while shifting the event-name link for privileged users to the view page.

Changes:

  • Changed the event name link (for admins/program managers) from /edit to /view.
  • Added an “Edit Event” button next to the existing invite/email button for admins/program managers.
  • Updated permission checks around which users see invite/edit actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +148 to +151
{% if user.isProgramManagerFor(event.program) %}
{% set btn_class = 'btn-secondary' if event.isPastStart or event.isCanceled else 'btn-primary' %}
<a class="btn {{btn_class}}" href="/event/{{ event.id }}/edit"><span class="bi bi-pencil-fill"></span> Edit Event</a>
{% endif %}
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the {% else %} branch of {% if user.isCeltsAdmin or user.isProgramManagerFor(event.program) %}, the nested {% if user.isProgramManagerFor(event.program) %} condition can never be true, so this Edit button code is unreachable. Remove the dead conditional/code, or restructure the outer condition if you intended program managers to hit this branch (e.g., show only Edit without Invite).

Suggested change
{% if user.isProgramManagerFor(event.program) %}
{% set btn_class = 'btn-secondary' if event.isPastStart or event.isCanceled else 'btn-primary' %}
<a class="btn {{btn_class}}" href="/event/{{ event.id }}/edit"><span class="bi bi-pencil-fill"></span> Edit Event</a>
{% endif %}

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 27, 2026 18:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit Event Button Addition on Events list page

3 participants