diff options
Diffstat (limited to 'app/views/admin')
| -rw-r--r-- | app/views/admin/_recent_changes.html.erb | 24 | ||||
| -rw-r--r-- | app/views/admin/index.html.erb | 12 |
2 files changed, 1 insertions, 35 deletions
diff --git a/app/views/admin/_recent_changes.html.erb b/app/views/admin/_recent_changes.html.erb deleted file mode 100644 index 88b5e93..0000000 --- a/app/views/admin/_recent_changes.html.erb +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | <h2>Recent Changes</h2> | ||
| 2 | <div id="draft_list"> | ||
| 3 | <table> | ||
| 4 | <tr class="header"> | ||
| 5 | <th>Title</th> | ||
| 6 | <th>path</th> | ||
| 7 | <th>user</th> | ||
| 8 | <th>date</th> | ||
| 9 | <th></th> | ||
| 10 | </tr> | ||
| 11 | <% @recent_changes.each do |node| %> | ||
| 12 | <tr> | ||
| 13 | <td><%= truncated_title_for_node node %></td> | ||
| 14 | <td><%= node.unique_name %></td> | ||
| 15 | <td><%= node.draft.user.login rescue "" %></td> | ||
| 16 | <td><%= node.updated_at.to_fs(:db) %></td> | ||
| 17 | <td class="actions"> | ||
| 18 | <%= link_to 'Show', node_path(node) %> | ||
| 19 | <%= link_to "Revisions", revision_path(:id => node.id) %> | ||
| 20 | </td> | ||
| 21 | </tr> | ||
| 22 | <% end %> | ||
| 23 | </table> | ||
| 24 | </div> \ No newline at end of file | ||
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> |
