From 8199b48ae5d31b008f10dff173352bd8ba2d8890 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 5 Feb 2025 23:04:13 +0100 Subject: Enhance admin view by sitemap --- app/views/admin/index.html.erb | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'app/views/admin') 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 @@

recent changes current drafts + site map

@@ -64,9 +65,41 @@ <%= node.lock_owner.login if node.lock_owner %> - <%= node.draft ? node.draft.revision : node.head.revision %> + <%= node.draft ? node.draft.revision : ( node.head ? node.head.revision : "EMPTY" ) %> <% end %> -
\ No newline at end of file + + +
+ +

Sitemap

+ + + + + + + + + <% @sitemap.each do |node| %> + <% if !node.nil? %> + "> + + + + + + <% end %> + <% end %> +
IDTitleActionsLocked by
<%= node.id %> +

<%= link_to title_for_node(node), node_path(node) %>

+

<%= link_to_path(node.unique_name, node.unique_name) %>

+
+ <%= link_to 'show', node_path(node) %> + <%= link_to 'Revisions', node_revisions_path(node) %> + + <%= node.lock_owner.login if node.lock_owner %> +
+
-- cgit v1.3