From 190daaa8a0bb79e750894b83e31b9d99f7d900a4 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 16 Jul 2026 03:30:01 +0200 Subject: Add a reader for the action log at admin/log NodeActionsController#index lists entries newest-first, filterable by node_id or user_id -- the two zoom shapes the log was designed around. Rendering goes through NodeActionsHelper.action_summary, which builds one sentence per entry from metadata alone, so entries referencing deleted users or nodes render from their snapshots; live associations only upgrade names to links. Unknown verbs degrade to a generic sentence rather than an error, since the log outlives its vocabulary. The helper is the escaping boundary: every metadata value passes through h() before assembly. Actor names link to the log's own user zoom rather than the unused users page -- inspecting a suspicious user's other actions is the intended workflow. Publish entries with a translation_diff expose a collapsed per-locale change table linking out to the revision itself. Sentences live in en.yml/de.yml following the existing widget-string convention. nodes#show links to its node's zoomed log. --- config/locales/de.yml | 20 ++++++++++++++++++++ config/locales/en.yml | 20 ++++++++++++++++++++ config/routes.rb | 1 + 3 files changed, 41 insertions(+) (limited to 'config') diff --git a/config/locales/de.yml b/config/locales/de.yml index 74cd183..4e7b11d 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -82,3 +82,23 @@ de: page_gap: "…" container_aria_label: "Seitennavigation" page_aria_label: "Seite %{page}" + + node_actions: + heading: "Letzte Änderungen" + show_all: "Alle Einträge zeigen" + backfilled: "rekonstruiert" + show_changes: "Änderungen an Übersetzungen" + view_revision: "Diese Revision ansehen" + actor_self: "du" + unknown: "%{actor} hat %{action} auf %{subject} aus" + publish: "%{actor} hat %{subject} veröffentlicht, (vorher: %{from})" + publish_first: "%{actor} hat %{subject} zum ersten Mal veröffentlicht" + publish_rollback: "%{actor} hat %{subject} auf eine frühere Revision zurückgesetzt (vorher: %{from})" + create: "%{actor} hat %{subject} unter %{path} angelegt" + move: "%{actor} hat %{subject} von %{from} nach %{to} verschoben" + discard_autosave: "%{actor} hat ungespeicherte Änderungen an %{subject} verschoben" + destroy_draft: "%{actor} hat den Entwurf von %{subject} verworfen" + locale_added: "Übersetzung angelegt, Titel \"%{title}\"" + locale_removed: "Übersetzung entfernt, letzter Titel \"%{title}\"" + abstract_changed: "Abstract geändert" + body_changed: "Text geändert" diff --git a/config/locales/en.yml b/config/locales/en.yml index c52280d..8470778 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -34,3 +34,23 @@ en: page_gap: "…" container_aria_label: "Pagination" page_aria_label: "Page %{page}" + + node_actions: + heading: "Action log" + show_all: "Show all entries" + backfilled: "backfilled" + show_changes: "translation changes" + view_revision: "view this revision" + actor_self: "you" + unknown: "%{actor} did %{action} on %{subject}" + publish: "%{actor} published %{subject} (was: %{from})" + publish_first: "%{actor} published %{subject} for the first time" + publish_rollback: "%{actor} rolled %{subject} back to an earlier revision (was: %{from})" + create: "%{actor} created %{subject} at %{path}" + move: "%{actor} moved %{subject} from %{from} to %{to}" + discard_autosave: "%{actor} discarded unsaved changes on %{subject}" + destroy_draft: "%{actor} discarded the draft of %{subject}" + locale_added: "translation added, titled \"%{title}\"" + locale_removed: "translation removed, last titled \"%{title}\"" + abstract_changed: "abstract changed" + body_changed: "body changed" diff --git a/config/routes.rb b/config/routes.rb index 8e5ff23..c2b9590 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -86,6 +86,7 @@ Cccms::Application.routes.draw do match 'menu_search' => 'admin#menu_search', :as => :admin_menu_search, :via => :get match 'conventions' => 'admin#conventions', :as => :admin_conventions, :via => :get match 'dashboard_search' => 'admin#dashboard_search', :as => :admin_dashboard_search, :via => :get + match 'log' => 'node_actions#index', :as => :admin_log, :via => :get end match '/logout' => 'sessions#destroy', :as => :logout, :via => :delete -- cgit v1.3