From 603ccfbd5fe96f0b83aaf3d5118aded2a39992fb Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 16 Jul 2026 13:50:15 +0200 Subject: Condense the action log into a scannable table Several minor improvements to the action log presentation: * Now a table with date and human readable presentation as rows is displayed * If no changes in a title were detected, the old version is omitted * The "inferred" flag is demoted to the end of the line * You can zoom in on the node's history directly from a log line * byline for the first publish action is preserved * Revisions are directly linked to when a new one i published --- app/views/node_actions/_change_details.html.erb | 30 ++++++++++++------------- app/views/node_actions/index.html.erb | 25 ++++++++++++--------- 2 files changed, 30 insertions(+), 25 deletions(-) (limited to 'app/views/node_actions') diff --git a/app/views/node_actions/_change_details.html.erb b/app/views/node_actions/_change_details.html.erb index 383f53a..2583e8b 100644 --- a/app/views/node_actions/_change_details.html.erb +++ b/app/views/node_actions/_change_details.html.erb @@ -1,27 +1,27 @@
<%= t("node_actions.show_changes") %> - <% action_entry.metadata["translation_diff"].each do |locale, diff| %> + <% if (default_items = default_locale_changes(action_entry)).any? %> + + + + + <% end %> + <% (action_entry.metadata["translation_diff"] || {}).each do |locale, diff| %> <% end %>
<%= I18n.default_locale.to_s.upcase %> + <%= safe_join(default_items, ", ") %> + <% if action_entry.page && action_entry.node %> + <%= link_to t("node_actions.view_revision"), node_revision_path(action_entry.node, action_entry.page) %> + <% end %> +
<%= locale.upcase %> - <% case diff["status"] %> - <% when "added" %> - <%= t("node_actions.locale_added", :title => diff.dig("title", "to")) %> - <% when "removed" %> - <%= t("node_actions.locale_removed", :title => diff.dig("title", "from")) %> - <% else %> - <% if diff["title"] %> - <%= diff.dig("title", "from") %> → <%= diff.dig("title", "to") %> - <% end %> - <%= t("node_actions.abstract_changed") if diff["abstract_changed"] %> - <%= t("node_actions.body_changed") if diff["body_changed"] %> + <%= safe_join(translation_changes(diff), ", ") %> + <% if action_entry.page && action_entry.node %> + <%= link_to t("node_actions.view_revision"), node_revision_path(action_entry.node, action_entry.page, :locale => locale) %> <% end %>
- <% if action_entry.page && action_entry.node %> - <%= link_to t("node_actions.view_revision"), node_revision_path(action_entry.node, action_entry.page) %> - <% end %>
diff --git a/app/views/node_actions/index.html.erb b/app/views/node_actions/index.html.erb index 92740cd..ee06213 100644 --- a/app/views/node_actions/index.html.erb +++ b/app/views/node_actions/index.html.erb @@ -6,17 +6,22 @@ <%= will_paginate @actions %> -