From da5bb5788802c725f9f14b72e6a54c6c38ea5e0a Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 17 Jul 2026 17:52:08 +0200 Subject: Retire recent changes widget, replace with action log --- app/controllers/admin_controller.rb | 1 - app/views/admin/index.html.erb | 24 +----------------------- app/views/node_actions/index.html.erb | 16 +--------------- public/stylesheets/admin.css | 8 ++++---- 4 files changed, 6 insertions(+), 43 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 40cfbdc..8bd99ac 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -6,7 +6,6 @@ class AdminController < ApplicationController def index @drafts = Node.drafts_and_autosaves(current_user_id: current_user.id).limit(5) - @recent_changes = Node.recently_changed.limit(5) @actions = NodeAction.order(:occurred_at => :desc, :id => :desc).limit(5) end diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index 1b4a0a0..7933cba 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb @@ -40,32 +40,10 @@ <%= link_to "See all drafts →", drafts_nodes_path %> - -

Recent changes

- <% @actions.each do |action| %> - - - - - <% end %> + <%= render partial: "node_actions/action_row", collection: @actions, as: :action %>
<%= raw(action.occurred_at.strftime("%Y-%m-%d %H:%M").gsub(" ", "
")) %>
- <%= action_summary(action) %> - <% if action.node_id && params[:node_id].blank? %> - <%= link_to t("node_actions.node_history"), admin_log_path(:node_id => action.node_id), :class => "node_action_zoom" %> - <% end %> - <% if action.inferred_from %> - <%= t("node_actions.backfilled") %> - <% end %> - <%= render "node_actions/change_details", :action_entry => action if action_details?(action) %> -
<%= link_to "See all recent changes →", admin_log_path %>
diff --git a/app/views/node_actions/index.html.erb b/app/views/node_actions/index.html.erb index ee06213..20ef5b3 100644 --- a/app/views/node_actions/index.html.erb +++ b/app/views/node_actions/index.html.erb @@ -7,21 +7,7 @@ <%= will_paginate @actions %> - <% @actions.each do |action| %> - - - - - <% end %> + <%= render partial: "node_actions/action_row", collection: @actions, as: :action %>
<%= action.occurred_at.strftime("%Y-%m-%d %H:%M") %> - <%= action_summary(action) %> - <% if action.node_id && params[:node_id].blank? %> - <%= link_to t("node_actions.node_history"), admin_log_path(:node_id => action.node_id), :class => "node_action_zoom" %> - <% end %> - <% if action.inferred_from %> - <%= t("node_actions.backfilled") %> - <% end %> - <%= render "change_details", :action_entry => action if action_details?(action) %> -
<%= will_paginate @actions %> diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 128933b..82963dd 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css @@ -1502,14 +1502,14 @@ div#image_browser ul li { Action log ============================================================ */ -#dashboard_widget td.node_action_time { - white-space: wrap; -} - #node_action_list td.node_action_body { border-bottom: 1px solid #f1f1f1; } +.dashboard_widget .node_action_time span { + display: block; +} + #node_action_list td.node_action_time { white-space: nowrap; vertical-align: top; -- cgit v1.3