Skip to content

Admin niceties: inline toggles, bulk actions, keyword cleanup (#1346, Phase 4)#1351

Merged
jonfroehlich merged 1 commit into
masterfrom
1346-admin-phase4-niceties
Jun 19, 2026
Merged

Admin niceties: inline toggles, bulk actions, keyword cleanup (#1346, Phase 4)#1351
jonfroehlich merged 1 commit into
masterfrom
1346-admin-phase4-niceties

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Phase 4 of #1346 — the workflow niceties. (The destructive merge-keywords action is intentionally split into its own focused follow-up PR.)

Project

  • is_visible inline-editable in the changelist — flip a project public/private without opening it (renders as the plain checkbox the change form already uses; name stays the row link).
  • Bulk actions: Mark public / Mark private.

Publication

  • Export selected as BibTeX — downloads a single .bib (uses get_citation_as_bibtex(newline="\n", use_hyperlinks=False) so it's a valid file, not admin display markup).
  • Bulk actions: Mark peer-reviewed / Mark not peer-reviewed.

Keyword cleanup

  • Usage counting broadened to every referencing model (Publication, Talk, Poster, Grant, Project, ProjectUmbrella) via scalar subqueries (related_count_subquery from Phase 2), exposed as a sortable "Total Uses" column.
  • New "Usage: Used / Unused" filter to surface orphan tags for deletion.
  • Fixes a real blind spot: previously a keyword used only by a Talk showed 0 / 0 and looked unused. Now total_usage counts 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 check clean.

Merge note

Shares publication_admin.py with 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

, 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>
@jonfroehlich jonfroehlich merged commit a2723a3 into master Jun 19, 2026
3 checks passed
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.

1 participant