Add Team Members + Activity Log quick links to admin header - #1423
Closed
jonfroehlich wants to merge 3 commits into
Closed
Add Team Members + Activity Log quick links to admin header#1423jonfroehlich wants to merge 3 commits into
jonfroehlich wants to merge 3 commits into
Conversation
Surfaces two easy-to-forget internal pages in the admin top-nav (userlinks): - Team Members -> /view-project-people/ (public project-team roster), which isn't linked from the main nav so it's easy to lose track of. - Activity Log -> the superuser-only LogEntry changelist (#1413), wrapped in {% if user.is_superuser %} to match the page's own gate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`website/urls.py` sets `app_name = "website"`, so the roster reverses as
`website:view_project_people`, not the bare `view_project_people`. The
un-namespaced `{% url %}` raised NoReverseMatch while rendering the
`userlinks` block of base_site.html -- which every admin page extends, so
the whole admin 500'd for any logged-in staff user, not just the linked
page. (It slipped through because the manual check only confirmed the URL
*path* served 200 and that the admin index 302'd to login; a 302 never
renders the template.)
Adds website/tests/test_admin_header_links.py to pin both reverses and
the superuser gate on the Activity Log link, so a future URL-name rename
fails a test instead of taking down the admin.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Label the roster link "Project People" to match that page's own <h1>/
<title> ("Project People Viewer") instead of introducing a second name
for the same page.
- Give both new-tab links a visually-hidden "(opens in a new tab)" cue
(WCAG 3.2.5). `.visually-hidden` is Django admin's own screen-reader
helper class in admin/css/base.css, so no new CSS ships.
- Bump ML_WEBSITE_VERSION to 2.28.1 with a release description.
Test coverage extended to pin the new-tab cue on both links.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jonfroehlich
force-pushed
the
admin-header-quicklinks
branch
from
July 27, 2026 21:42
0c7eb75 to
f514380
Compare
Member
Author
jonfroehlich
added a commit
that referenced
this pull request
Jul 27, 2026
Closes #1428. Supersedes #1423. Surfaces two easy-to-forget internal pages in the admin top-nav (`userlinks` block of `base_site.html`): - Project People -> /view-project-people/, the project-team roster, which nothing in the main site nav links to. Labeled to match that page's own <h1>/<title> rather than inventing a second name for it. - Activity Log -> the site-wide admin action log (#1413), wrapped in {% if user.is_superuser %} to match the gate LogEntryAdmin already enforces, so editors/contributors are never shown a link to a page they cannot open. Both new-tab links carry a visually-hidden "(opens in a new tab)" cue (WCAG 3.2.5) built on Django admin's own .visually-hidden helper class, so no new CSS ships. Fixes a NoReverseMatch caught in review: website/urls.py sets app_name = "website", so the roster reverses as website:view_project_people. The bare name raised inside the userlinks block of base_site.html -- the parent template of EVERY admin page -- which would have 500'd the whole admin for any logged-in staff user rather than merely breaking one link (and shown a public traceback on -test, where DEBUG is True). It slipped past manual testing because hitting /view-project-people/ exercises the URL path rather than the reverse name, and an unauthenticated admin request 302s to login without ever rendering the template. Adds website/tests/test_admin_header_links.py, which renders the admin index as a real logged-in user and pins both reverses, the superuser gate, the roster's public reachability, and the new-tab cue -- so a future URL-name rename fails a test instead of taking down the admin. Bumps ML_WEBSITE_VERSION to 2.28.1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
What & why
Two internal pages are easy to forget because neither is linked from the main site nav. This surfaces both in the admin top-nav (
userlinksblock ofbase_site.html):/view-project-people/— the public project-team roster (view_project_peopleview).LogEntrychangelist (Superuser: browse site-wide admin action log (all users, not just My actions) #1413), wrapped in{% if user.is_superuser %}so it only shows for superusers, matching the page's own gate.Screenshot
Admin header now reads: Team Members / Activity Log / GitHub / WELCOME, USER / … (Activity Log visible to superusers only).
UI change is a two-link addition to an existing header row; before/after is the presence of the two leading links.
Testing
/view-project-people/→ 200,admin:admin_logentry_changelist→ 302 (login).🤖 Generated with Claude Code