1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
<h1>cccms dashboard</h1>
<div id="dashboard_search">
<%= form_tag admin_search_path, method: :get do %>
<%= text_field_tag :search_term, nil, id: "dashboard_search_term", placeholder: "Search nodes and tags…", autocomplete: "off" %>
<% end %>
<div id="dashboard_search_results" class="search_results"></div>
</div>
<div id="dashboard_signposts" class="button_row">
<%= link_to new_node_path, class: "action_button" do %>
<%= icon("plus", library: "tabler", "aria-hidden": true) %> Create post
<% end %>
<%= link_to chapters_nodes_path, class: "action_button" do %>
<%= icon("map-pin", library: "tabler", "aria-hidden": true) %> Find a chapter
<% end %>
<%= link_to new_asset_path, class: "action_button" do %>
<%= icon("upload", library: "tabler", "aria-hidden": true) %> Upload asset
<% end %>
<%= link_to sitemap_nodes_path, class: "action_button" do %>
<%= icon("list-tree", library: "tabler", "aria-hidden": true) %> Add a page in the page tree
<% end %>
</div>
<div id="dashboard_widgets">
<div class="dashboard_widget">
<h3>Drafts and autosaves</h3>
<ul>
<% @drafts.each do |node| %>
<li>
<div>
<%= link_to title_for_node(node), node_path(node) %>
<span class="field_hint"><%= link_to_path("#{node.unique_name} ↗", node.unique_name) %></span>
</div>
<span class="dashboard_widget_meta">
<% if (editor = node_last_editor(node)) %><%= editor %>, <% end %><%= relative_time_phrase(node.updated_at) %>
</span>
</li>
<% end %>
</ul>
<%= link_to "See all drafts →", drafts_nodes_path %>
</div>
<!--div class="dashboard_widget">
<h3>Recent changes</h3>
<ul>
<%= render partial: "nodes/recent_change_item", collection: @recent_changes, as: :node %>
</ul>
<%= link_to "See all recent changes →", recent_nodes_path %>
</div-->
<div class="dashboard_widget">
<h3>Recent changes</h3>
<table id="node_action_list">
<% @actions.each do |action| %>
<tr class="node_action node_action--<%= action.action %>">
<td class="node_action_time"><%= raw(action.occurred_at.strftime("%Y-%m-%d %H:%M").gsub(" ", "<br/>")) %></td>
<td class="node_action_body">
<%= 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 %>
<span class="node_action_inferred" title="<%= action.inferred_from %>"><%= t("node_actions.backfilled") %></span>
<% end %>
<%= render "node_actions/change_details", :action_entry => action if action_details?(action) %>
</td>
</tr>
<% end %>
</table>
<%= link_to "See all recent changes →", admin_log_path %>
</div>
</div>
<div id="dashboard_housekeeping">
<h3>Housekeeping</h3>
<div class="button_row">
<%= link_to nodes_path, class: "action_button" do %>
<%= icon("list", library: "tabler", "aria-hidden": true) %> Nodes
<% end %>
<%= link_to events_path, class: "action_button" do %>
<%= icon("calendar", library: "tabler", "aria-hidden": true) %> Events
<% end %>
<%= link_to assets_path, class: "action_button" do %>
<%= icon("folder", library: "tabler", "aria-hidden": true) %> Assets
<% end %>
<%= link_to users_path, class: "action_button" do %>
<%= icon("users", library: "tabler", "aria-hidden": true) %> Users
<% end %>
<%= link_to menu_items_path, class: "action_button" do %>
<%= icon("menu-2", library: "tabler", "aria-hidden": true) %> Navigation
<% end %>
</div>
</div>
|