summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/admin_controller.rb1
-rw-r--r--app/views/admin/index.html.erb24
-rw-r--r--app/views/node_actions/index.html.erb16
-rw-r--r--public/stylesheets/admin.css8
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
6 6
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)
10 @actions = NodeAction.order(:occurred_at => :desc, :id => :desc).limit(5) 9 @actions = NodeAction.order(:occurred_at => :desc, :id => :desc).limit(5)
11 end 10 end
12 11
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 @@
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">
44 <h3>Recent changes</h3>
45 <ul>
46 <%= render partial: "nodes/recent_change_item", collection: @recent_changes, as: :node %>
47 </ul>
48 <%= link_to "See all recent changes →", recent_nodes_path %>
49 </div-->
50
51 <div class="dashboard_widget"> 43 <div class="dashboard_widget">
52 <h3>Recent changes</h3> 44 <h3>Recent changes</h3>
53 <table id="node_action_list"> 45 <table id="node_action_list">
54 <% @actions.each do |action| %> 46 <%= render partial: "node_actions/action_row", collection: @actions, as: :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> 47 </table>
70 <%= link_to "See all recent changes →", admin_log_path %> 48 <%= link_to "See all recent changes →", admin_log_path %>
71 </div> 49 </div>
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 @@
7<%= will_paginate @actions %> 7<%= will_paginate @actions %>
8 8
9<table id="node_action_list"> 9<table id="node_action_list">
10 <% @actions.each do |action| %> 10 <%= render partial: "node_actions/action_row", collection: @actions, as: :action %>
11 <tr class="node_action node_action--<%= action.action %>">
12 <td class="node_action_time"><%= action.occurred_at.strftime("%Y-%m-%d %H:%M") %></td>
13 <td class="node_action_body">
14 <%= action_summary(action) %>
15 <% if action.node_id && params[:node_id].blank? %>
16 <%= link_to t("node_actions.node_history"), admin_log_path(:node_id => action.node_id), :class => "node_action_zoom" %>
17 <% end %>
18 <% if action.inferred_from %>
19 <span class="node_action_inferred" title="<%= action.inferred_from %>"><%= t("node_actions.backfilled") %></span>
20 <% end %>
21 <%= render "change_details", :action_entry => action if action_details?(action) %>
22 </td>
23 </tr>
24 <% end %>
25</table> 11</table>
26 12
27<%= will_paginate @actions %> 13<%= 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 {
1502 Action log 1502 Action log
1503 ============================================================ */ 1503 ============================================================ */
1504 1504
1505#dashboard_widget td.node_action_time {
1506 white-space: wrap;
1507}
1508
1509#node_action_list td.node_action_body { 1505#node_action_list td.node_action_body {
1510 border-bottom: 1px solid #f1f1f1; 1506 border-bottom: 1px solid #f1f1f1;
1511} 1507}
1512 1508
1509.dashboard_widget .node_action_time span {
1510 display: block;
1511}
1512
1513#node_action_list td.node_action_time { 1513#node_action_list td.node_action_time {
1514 white-space: nowrap; 1514 white-space: nowrap;
1515 vertical-align: top; 1515 vertical-align: top;