diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/admin/index.html.erb | 12 | ||||
| -rw-r--r-- | app/views/nodes/_recent_change_item.html.erb | 9 | ||||
| -rw-r--r-- | app/views/nodes/recent.html.erb | 6 |
3 files changed, 15 insertions, 12 deletions
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index bdb555e..a9c0512 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb | |||
| @@ -43,17 +43,7 @@ | |||
| 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 | <% @recent_changes.each do |node| %> | 46 | <%= render partial: "nodes/recent_change_item", collection: @recent_changes, as: :node %> |
| 47 | <li> | ||
| 48 | <div> | ||
| 49 | <%= link_to title_for_node(node), node_path(node) %> | ||
| 50 | <span class="field_hint"><%= link_to_path("#{node.unique_name} ↗", node.unique_name) %></span> | ||
| 51 | </div> | ||
| 52 | <span class="dashboard_widget_meta"> | ||
| 53 | <%= (editor = node_head_editor(node)) ? t("published_by", editor: editor) : t("published") %>, <%= relative_time_phrase(node.head.updated_at) %> | ||
| 54 | </span> | ||
| 55 | </li> | ||
| 56 | <% end %> | ||
| 57 | </ul> | 47 | </ul> |
| 58 | <%= link_to "See all recent changes →", recent_nodes_path %> | 48 | <%= link_to "See all recent changes →", recent_nodes_path %> |
| 59 | </div> | 49 | </div> |
diff --git a/app/views/nodes/_recent_change_item.html.erb b/app/views/nodes/_recent_change_item.html.erb new file mode 100644 index 0000000..754a775 --- /dev/null +++ b/app/views/nodes/_recent_change_item.html.erb | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <li> | ||
| 2 | <div> | ||
| 3 | <%= link_to title_for_node(node), node_path(node) %> | ||
| 4 | <span class="field_hint"><%= link_to_path("#{node.unique_name} ↗", node.unique_name) %></span> | ||
| 5 | </div> | ||
| 6 | <span class="dashboard_widget_meta"> | ||
| 7 | <%= (editor = node_head_editor(node)) ? t("last_edited_by", editor: editor) : t("last_edited") %>, <%= relative_time_phrase(node.head.updated_at) %> | ||
| 8 | </span> | ||
| 9 | </li> | ||
diff --git a/app/views/nodes/recent.html.erb b/app/views/nodes/recent.html.erb index 3602775..d256253 100644 --- a/app/views/nodes/recent.html.erb +++ b/app/views/nodes/recent.html.erb | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | <h1>Recently changed</h1> | 1 | <h1>Recently changed</h1> |
| 2 | 2 | ||
| 3 | <%= render 'node_list' %> | 3 | <%= will_paginate @nodes %> |
| 4 | <ul id="recent_changes_full_list"> | ||
| 5 | <%= render partial: "nodes/recent_change_item", collection: @nodes, as: :node %> | ||
| 6 | </ul> | ||
| 7 | <%= will_paginate @nodes %> | ||
