From 28a6999b55cbec555696df848d6e924aae3166ee Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 15 Jul 2026 01:10:17 +0200 Subject: Make the recent-changes page match the widget it links from nodes/recent rendered the generic node-listing partial (id, actions, current lock owner, revision number) -- nothing resembling what 'See all recent changes' actually promised to show more of. Both surfaces now render the same extracted partial, so they can't tell two different stories again. Also: head.editor correctly identifies who last wrote the content sitting in head, but publish_draft! never touches editor at all -- nobody has ever had the specific act of publishing recorded anywhere. 'Published by X' was a claim the data never supported, only incidentally true when the same person who drafted something also happened to publish it. Relabeled to 'last edited by' -- same data, accurately described. A real publish-actor is separate, future work, once the action log exists. Basic list styling added for the full page, which had never rendered outside the widget's own compact five-line context before. --- app/views/admin/index.html.erb | 12 +----------- app/views/nodes/_recent_change_item.html.erb | 9 +++++++++ app/views/nodes/recent.html.erb | 6 +++++- config/locales/de.yml | 2 ++ config/locales/en.yml | 2 ++ public/stylesheets/admin.css | 19 +++++++++++++++++++ 6 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 app/views/nodes/_recent_change_item.html.erb diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index bdb555e..a9c0512 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb @@ -43,17 +43,7 @@

Recent changes

<%= link_to "See all recent changes →", recent_nodes_path %>
diff --git a/app/views/nodes/_recent_change_item.html.erb b/app/views/nodes/_recent_change_item.html.erb new file mode 100644 index 0000000..754a775 --- /dev/null +++ b/app/views/nodes/_recent_change_item.html.erb @@ -0,0 +1,9 @@ +
  • +
    + <%= link_to title_for_node(node), node_path(node) %> + <%= link_to_path("#{node.unique_name} ↗", node.unique_name) %> +
    + + <%= (editor = node_head_editor(node)) ? t("last_edited_by", editor: editor) : t("last_edited") %>, <%= relative_time_phrase(node.head.updated_at) %> + +
  • diff --git a/app/views/nodes/recent.html.erb b/app/views/nodes/recent.html.erb index 3602775..d256253 100644 --- a/app/views/nodes/recent.html.erb +++ b/app/views/nodes/recent.html.erb @@ -1,3 +1,7 @@

    Recently changed

    -<%= render 'node_list' %> +<%= will_paginate @nodes %> + +<%= will_paginate @nodes %> diff --git a/config/locales/de.yml b/config/locales/de.yml index 550ccb3..74cd183 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -16,6 +16,8 @@ de: open_today: "Das Chaos, lokal und heute offen" published: "veröffentlicht" published_by: "veröffentlicht durch %{editor}" + last_edited: "zuletzt bearbeitet" + last_edited_by: "zuletzt bearbeitet durch %{editor}" editor_self: "du" publisher_self: "dich" date: diff --git a/config/locales/en.yml b/config/locales/en.yml index 73271ed..c52280d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -17,6 +17,8 @@ en: open_today: "Open today" published: "published" published_by: "published by %{editor}" + last_edited: "last edited" + last_edited_by: "last edited by %{editor}" publisher_self: "you" editor_self: "you" diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index b5b8707..5f0b165 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css @@ -1121,6 +1121,25 @@ div#draft_list table td.actions a { font-size: 0.9em; } +#recent_changes_full_list { + list-style: none; + padding: 0; + margin: 0; +} + +#recent_changes_full_list li { + padding: 0.75rem 0; + border-bottom: 1px solid #eee; +} + +#recent_changes_full_list li:last-child { + border-bottom: none; +} + +#recent_changes_full_list li > div { + margin-bottom: 0.25rem; +} + /* ============================================================ Search widgets ============================================================ */ -- cgit v1.3