Open
Conversation
Contributor
There was a problem hiding this comment.
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
/editto/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 %} |
There was a problem hiding this comment.
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 %} |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update events edit button functionality
Fixes #1597
Changes
Testing