Admin niceties: inline toggles, bulk actions, keyword cleanup (#1346, Phase 4)#1351
Merged
Conversation
, Phase 4) Workflow niceties from the admin audit (the merge-keywords action is a separate follow-up). - Project: is_visible is now inline-editable in the changelist (public/ private toggle), plus "Mark public" / "Mark private" bulk actions. - Publication: "Export selected as BibTeX" (downloads a .bib via get_citation_as_bibtex with plain newlines / no hyperlinks) and "Mark / Mark not peer-reviewed" bulk actions. - Keyword: usage counting broadened to every referencing model (Publication, Talk, Poster, Grant, Project, ProjectUmbrella) via scalar subqueries, exposed as a sortable "Total Uses" column, plus a "Usage: Used / Unused" filter to surface orphan tags. Fixes the old blind spot where a keyword used only by a Talk showed 0/0 and looked unused. Tests (test_admin_actions.py) cover every action and the keyword total-usage/orphan logic. Full suite green; admin system checks clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 19, 2026
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.
Phase 4 of #1346 — the workflow niceties. (The destructive merge-keywords action is intentionally split into its own focused follow-up PR.)
Project
is_visibleinline-editable in the changelist — flip a project public/private without opening it (renders as the plain checkbox the change form already uses;namestays the row link).Publication
.bib(usesget_citation_as_bibtex(newline="\n", use_hyperlinks=False)so it's a valid file, not admin display markup).Keyword cleanup
related_count_subqueryfrom Phase 2), exposed as a sortable "Total Uses" column.0 / 0and looked unused. Nowtotal_usagecounts it, so the Unused filter is trustworthy.Tests (
test_admin_actions.py)Every action (project visibility, BibTeX download shape, peer-reviewed toggles) plus the keyword total-usage and orphan/Unused logic — including the talk-only-keyword-is-not-unused case. Full suite green;
manage.py checkclean.Merge note
Shares
publication_admin.pywith the open Phase 3 PR (#1350); verified they auto-merge with no conflicts (different regions).Screenshots
Project list with the inline visibility checkboxes + the new actions dropdown — to be added.
🤖 Generated with Claude Code