summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-10-18 17:57:18 +0200
committerhukl <contact@smyck.org>2009-10-18 17:57:18 +0200
commitf7d4d68953f913fa025d140674c6db56ed612c00 (patch)
treecaa5682d25cfe79e1e99572b75058ce6e72bc733 /app/views
parent443947a319692e0462024c99f06e4d18ab5f0344 (diff)
re-activated admin overview screen - listing 20 recent changes and 20 current drafts. more to come
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/index.html.erb67
-rw-r--r--app/views/nodes/index.html.erb2
2 files changed, 67 insertions, 2 deletions
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb
index bd0df0b..1e599aa 100644
--- a/app/views/admin/index.html.erb
+++ b/app/views/admin/index.html.erb
@@ -1,3 +1,68 @@
1<table id="admin_overview"> 1<p id="overview_toggle">
2 <a href="#" id="recent_changes_toggle" class="button">recent changes</a>
3 <a href="#" id="current_drafts_toggle" class="button">current drafts</a>
4</p>
5
6<div id="recent_changes_table">
2 7
8 <h1>Recent Changes</h1>
9
10 <table class="node_table">
11 <tr class="header">
12 <th class="node_id">ID</th>
13 <th class="title">Title</th>
14 <th class="actions">Actions</th>
15 <th class="editor">Locked by</th>
16 <th class="revision">Rev.</th>
17 </tr>
18 <% @recent_changes.each do |node| %>
19 <tr class="<%= cycle("even", "odd") %>">
20 <td class="node_id"><%= node.id %></td>
21 <td class="title">
22 <h4><%= link_to title_for_node(node), node_path(node) %></h4>
23 <p><%= link_to_path(node.unique_name, node.unique_name) %></p>
24 </td>
25 <td class="actions">
26 <%= link_to 'show', node_path(node) %>
27 <%= link_to 'Revisions', node_revisions_path(node) %>
28 </td>
29 <td>
30 <%= node.lock_owner.login if node.lock_owner %>
31 </td>
32 <td>
33 <%= node.draft ? node.draft.revision : node.head.revision %>
34 </td>
35 </tr>
36 <% end %>
37 </table>
38</div>
39<h1>Current Drafts</h1>
40
41<table id="current_drafts_table" class="node_table">
42 <tr class="header">
43 <th class="node_id">ID</th>
44 <th class="title">Title</th>
45 <th class="actions">Actions</th>
46 <th class="editor">Locked by</th>
47 <th class="revision">Rev.</th>
48 </tr>
49 <% @drafts.each do |node| %>
50 <tr class="<%= cycle("even", "odd") %>">
51 <td class="node_id"><%= node.id %></td>
52 <td class="title">
53 <h4><%= link_to title_for_node(node), node_path(node) %></h4>
54 <p><%= link_to_path(node.unique_name, node.unique_name) %></p>
55 </td>
56 <td class="actions">
57 <%= link_to 'show', node_path(node) %>
58 <%= link_to 'Revisions', node_revisions_path(node) %>
59 </td>
60 <td>
61 <%= node.lock_owner.login if node.lock_owner %>
62 </td>
63 <td>
64 <%= node.draft ? node.draft.revision : node.head.revision %>
65 </td>
66 </tr>
67 <% end %>
3</table> \ No newline at end of file 68</table> \ No newline at end of file
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb
index 46c58f6..bf01645 100644
--- a/app/views/nodes/index.html.erb
+++ b/app/views/nodes/index.html.erb
@@ -4,7 +4,7 @@
4<h1>Nodes</h1> 4<h1>Nodes</h1>
5 5
6<%= will_paginate @nodes %> 6<%= will_paginate @nodes %>
7 <table id="node_table"> 7 <table class="node_table">
8 <tr class="header"> 8 <tr class="header">
9 <th class="node_id">ID</th> 9 <th class="node_id">ID</th>
10 <th class="title">Title</th> 10 <th class="title">Title</th>