summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2025-02-05 23:04:13 +0100
committererdgeist <erdgeist@erdgeist.org>2025-02-05 23:04:13 +0100
commit8199b48ae5d31b008f10dff173352bd8ba2d8890 (patch)
tree2b8b8b61ba2b136193fbcda37113347539294a59 /app/views
parentd72edba966ba2b55697685f3711dbfcb38d9fbc8 (diff)
Enhance admin view by sitemap
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/index.html.erb37
1 files changed, 35 insertions, 2 deletions
diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb
index 526aa88..8c8271f 100644
--- a/app/views/admin/index.html.erb
+++ b/app/views/admin/index.html.erb
@@ -1,6 +1,7 @@
1<p id="overview_toggle"> 1<p id="overview_toggle">
2 <a href="#" id="recent_changes_toggle" class="button">recent changes</a> 2 <a href="#" id="recent_changes_toggle" class="button">recent changes</a>
3 <a href="#" id="current_drafts_toggle" class="button">current drafts</a> 3 <a href="#" id="current_drafts_toggle" class="button">current drafts</a>
4 <a href="#" id="admin_sitemap_toggle" class="button">site map</a>
4</p> 5</p>
5 6
6<div id="recent_changes_table"> 7<div id="recent_changes_table">
@@ -64,9 +65,41 @@
64 <%= node.lock_owner.login if node.lock_owner %> 65 <%= node.lock_owner.login if node.lock_owner %>
65 </td> 66 </td>
66 <td> 67 <td>
67 <%= node.draft ? node.draft.revision : node.head.revision %> 68 <%= node.draft ? node.draft.revision : ( node.head ? node.head.revision : "EMPTY" ) %>
68 </td> 69 </td>
69 </tr> 70 </tr>
70 <% end %> 71 <% end %>
71 </table> 72 </table>
72</div> \ No newline at end of file 73</div>
74
75<div id="admin_sitemap_table">
76
77 <h1>Sitemap</h1>
78
79 <table class="node_table">
80 <tr class="header">
81 <th class="node_id">ID</th>
82 <th class="title">Title</th>
83 <th class="actions">Actions</th>
84 <th class="editor">Locked by</th>
85 </tr>
86 <% @sitemap.each do |node| %>
87 <% if !node.nil? %>
88 <tr class="<%= cycle("even", "odd") %>">
89 <td class="node_id" style="padding-left: <%= @sitemap_depth[node.id] * 30 %>px;"><%= node.id %></td>
90 <td class="title" style="padding-left: <%= @sitemap_depth[node.id] * 30 %>px;">
91 <h4><%= link_to title_for_node(node), node_path(node) %></h4>
92 <p><%= link_to_path(node.unique_name, node.unique_name) %></p>
93 </td>
94 <td class="actions">
95 <%= link_to 'show', node_path(node) %>
96 <%= link_to 'Revisions', node_revisions_path(node) %>
97 </td>
98 <td>
99 <%= node.lock_owner.login if node.lock_owner %>
100 </td>
101 </tr>
102 <% end %>
103 <% end %>
104 </table>
105</div>