summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-17 00:43:12 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-17 00:43:12 +0200
commite26c0f3693b5a7c030f6280a26d05069aad0029a (patch)
tree6db7bbc83df05648b64b735145189156454178b4 /app
parent455d659ffbb0d12d75cc975fbe4cc24ce635ea3a (diff)
parentc810d1aa93a267dd8fcf8984c5d0b125629efa31 (diff)
Merge branch 'master' into erdgeist-modernize-autherdgeist-modernize-auth
Diffstat (limited to 'app')
-rw-r--r--app/controllers/admin_controller.rb1
-rw-r--r--app/views/admin/index.html.erb25
2 files changed, 25 insertions, 1 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 37fd78b..40cfbdc 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -7,6 +7,7 @@ class AdminController < ApplicationController
7 def index 7 def index
8 @drafts = Node.drafts_and_autosaves(current_user_id: current_user.id).limit(5) 8 @drafts = Node.drafts_and_autosaves(current_user_id: current_user.id).limit(5)
9 @recent_changes = Node.recently_changed.limit(5) 9 @recent_changes = Node.recently_changed.limit(5)
10 @actions = NodeAction.order(:occurred_at => :desc, :id => :desc).limit(5)
10 end 11 end
11 12
12 def conventions 13 def conventions
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb
index a9c0512..1b4a0a0 100644
--- a/app/views/admin/index.html.erb
+++ b/app/views/admin/index.html.erb
@@ -40,13 +40,36 @@
40 <%= link_to "See all drafts →", drafts_nodes_path %> 40 <%= link_to "See all drafts →", drafts_nodes_path %>
41 </div> 41 </div>
42 42
43 <div class="dashboard_widget"> 43 <!--div class="dashboard_widget">
44 <h3>Recent changes</h3> 44 <h3>Recent changes</h3>
45 <ul> 45 <ul>
46 <%= render partial: "nodes/recent_change_item", collection: @recent_changes, as: :node %> 46 <%= render partial: "nodes/recent_change_item", collection: @recent_changes, as: :node %>
47 </ul> 47 </ul>
48 <%= link_to "See all recent changes →", recent_nodes_path %> 48 <%= link_to "See all recent changes →", recent_nodes_path %>
49 </div-->
50
51 <div class="dashboard_widget">
52 <h3>Recent changes</h3>
53 <table id="node_action_list">
54 <% @actions.each do |action| %>
55 <tr class="node_action node_action--<%= action.action %>">
56 <td class="node_action_time"><%= raw(action.occurred_at.strftime("%Y-%m-%d %H:%M").gsub(" ", "<br/>")) %></td>
57 <td class="node_action_body">
58 <%= action_summary(action) %>
59 <% if action.node_id && params[:node_id].blank? %>
60 <%= link_to t("node_actions.node_history"), admin_log_path(:node_id => action.node_id), :class => "node_action_zoom" %>
61 <% end %>
62 <% if action.inferred_from %>
63 <span class="node_action_inferred" title="<%= action.inferred_from %>"><%= t("node_actions.backfilled") %></span>
64 <% end %>
65 <%= render "node_actions/change_details", :action_entry => action if action_details?(action) %>
66 </td>
67 </tr>
68 <% end %>
69 </table>
70 <%= link_to "See all recent changes →", admin_log_path %>
49 </div> 71 </div>
72
50</div> 73</div>
51 74
52<div id="dashboard_housekeeping"> 75<div id="dashboard_housekeeping">