summaryrefslogtreecommitdiff
path: root/app/views/admin/index.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/index.html.erb')
-rw-r--r--app/views/admin/index.html.erb85
1 files changed, 80 insertions, 5 deletions
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb
index 526aa88..2741db3 100644
--- a/app/views/admin/index.html.erb
+++ b/app/views/admin/index.html.erb
@@ -1,6 +1,15 @@
1<div id="admin_wizard">
2 <div class="admin_wizard_button"><%= link_to 'Create Update or Pressemitteilung', new_node_path, :only_path => false %></div>
3 <div class="admin_wizard_button"><a href="#" id="admin_wizard_my_work" class="button">Continue my work</a></div>
4 <div class="admin_wizard_button"><a href="#" id="admin_wizard_create_page" class="button">Add a page in the page tree</a></div>
5 <div class="admin_wizard_button"><%= link_to("Upload a new asset", new_asset_path, :only_path => false) %></div>
6</div>
7
1<p id="overview_toggle"> 8<p id="overview_toggle">
2 <a href="#" id="recent_changes_toggle" class="button">recent changes</a> 9 <a href="#" id="recent_changes_toggle" class="button">recent changes</a>
3 <a href="#" id="current_drafts_toggle" class="button">current drafts</a> 10 <a href="#" id="my_work_toggle" class="button">my work</a>
11 <a href="#" id="current_drafts_toggle" class="button">current drafts (<%= @drafts_count %>)</a>
12 <a href="#" id="admin_sitemap_toggle" class="button">site map</a>
4</p> 13</p>
5 14
6<div id="recent_changes_table"> 15<div id="recent_changes_table">
@@ -30,7 +39,41 @@
30 <%= node.lock_owner.login if node.lock_owner %> 39 <%= node.lock_owner.login if node.lock_owner %>
31 </td> 40 </td>
32 <td> 41 <td>
33 <%= node.draft ? node.draft.revision : node.head.revision %> 42 <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %>
43 </td>
44 </tr>
45 <% end %>
46 </table>
47</div>
48
49<div id="my_work_table">
50
51 <h1>My Work</h1>
52
53 <table class="node_table">
54 <tr class="header">
55 <th class="node_id">ID</th>
56 <th class="title">Title</th>
57 <th class="actions">Actions</th>
58 <th class="editor">Locked by</th>
59 <th class="revision">Rev.</th>
60 </tr>
61 <% @mynodes.each do |node| %>
62 <tr class="<%= cycle("even", "odd") %>">
63 <td class="node_id"><%= node.id %></td>
64 <td class="title">
65 <h4><%= link_to title_for_node(node), node_path(node) %></h4>
66 <p><%= link_to_path(node.unique_name, node.unique_name) %></p>
67 </td>
68 <td class="actions">
69 <%= link_to 'show', node_path(node) %>
70 <%= link_to 'Revisions', node_revisions_path(node) %>
71 </td>
72 <td>
73 <%= node.lock_owner.login if node.lock_owner %>
74 </td>
75 <td>
76 <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %>
34 </td> 77 </td>
35 </tr> 78 </tr>
36 <% end %> 79 <% end %>
@@ -39,7 +82,7 @@
39 82
40<div id="current_drafts_table"> 83<div id="current_drafts_table">
41 84
42 <h1>Current Drafts</h1> 85 <h1>Current Drafts (<%= @drafts_count %>)</h1>
43 86
44 <table class="node_table"> 87 <table class="node_table">
45 <tr class="header"> 88 <tr class="header">
@@ -64,9 +107,41 @@
64 <%= node.lock_owner.login if node.lock_owner %> 107 <%= node.lock_owner.login if node.lock_owner %>
65 </td> 108 </td>
66 <td> 109 <td>
67 <%= node.draft ? node.draft.revision : node.head.revision %> 110 <%= link_to ( node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY" ) ), node_revisions_path(node) %>
111 </td>
112 </tr>
113 <% end %>
114 </table>
115</div>
116
117<div id="admin_sitemap_table">
118
119 <h1>Sitemap</h1>
120
121 <table class="node_table">
122 <tr class="header">
123 <th class="node_id">ID</th>
124 <th class="title">Title</th>
125 <th class="actions">Actions</th>
126 <th class="editor">Locked by</th>
127 </tr>
128 <% @sitemap.each do |node| %>
129 <% if !node.nil? %>
130 <tr class="<%= cycle("even", "odd") %>">
131 <td class="node_id" style="padding-left: <%= @sitemap_depth[node.id] * 30 %>px;"><%= node.id %></td>
132 <td class="title" style="padding-left: <%= @sitemap_depth[node.id] * 30 %>px;">
133 <h4><%= link_to title_for_node(node), node_path(node) %></h4>
134 <p><%= link_to_path(node.unique_name, node.unique_name) %></p>
135 </td>
136 <td class="actions">
137 <%= link_to 'create subpage', new_node_path(:parent_id => node.id) %>
138 <%= link_to 'Revisions', node_revisions_path(node) %>
139 </td>
140 <td>
141 <%= node.lock_owner.login if node.lock_owner %>
68 </td> 142 </td>
69 </tr> 143 </tr>
70 <% end %> 144 <% end %>
145 <% end %>
71 </table> 146 </table>
72</div> \ No newline at end of file 147</div>