summaryrefslogtreecommitdiff
path: root/app/views/nodes/_node_list.html.erb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-04 07:07:05 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-04 07:07:05 +0200
commit409d71ed471703be8c56f2639a3ecb0fa387e6a7 (patch)
tree0a7108786cb549e343d8926b232f52a191570422 /app/views/nodes/_node_list.html.erb
parent974062f16169f6d07f2289564be6d72610b8770e (diff)
Give node lists a flag column and a shared action bar
Diffstat (limited to 'app/views/nodes/_node_list.html.erb')
-rw-r--r--app/views/nodes/_node_list.html.erb40
1 files changed, 30 insertions, 10 deletions
diff --git a/app/views/nodes/_node_list.html.erb b/app/views/nodes/_node_list.html.erb
index 0dc3c5a0..458ab1ae 100644
--- a/app/views/nodes/_node_list.html.erb
+++ b/app/views/nodes/_node_list.html.erb
@@ -15,26 +15,46 @@
15<%= will_paginate @nodes %> 15<%= will_paginate @nodes %>
16<table class="node_table"> 16<table class="node_table">
17 <tr class="header"> 17 <tr class="header">
18 <th class="node_id"><%= t("admin.columns.id") %></th>
19 <th class="title"><%= t("admin.columns.title") %></th> 18 <th class="title"><%= t("admin.columns.title") %></th>
20 <th class="actions"><%= t("admin.columns.actions") %></th> 19 <th class="actions"><%= t("admin.columns.actions") %></th>
21 <th class="editor"><%= t("admin.columns.locked_by") %></th>
22 <th class="revision"><%= t("admin.columns.rev") %></th> 20 <th class="revision"><%= t("admin.columns.rev") %></th>
23 </tr> 21 </tr>
24 <% @nodes.each do |node| %> 22 <% @nodes.each do |node| %>
25 <tr class="<%= cycle("even", "odd") %>"> 23 <tr class="<%= cycle("even", "odd") %>">
26 <td class="node_id"><%= node.id %></td>
27 <td class="title"> 24 <td class="title">
28 <h4><%= link_to title_for_node(node), node_path(node) %></h4> 25 <div class="title_with_flags">
29 <p><%= link_to_path(node.unique_name, node.unique_name) %></p> 26 <span class="flag_stack">
27 <%= flag("lock", t(".flag_locked", :login => node.lock_owner.login),
28 :tier => :attention) if node.lock_owner %>
29 <%= flag("calendar-clock",
30 t(".flag_embargo", :date => admin_datetime(node.head.published_at)),
31 :tier => :attention) if node.embargoed? %>
32 <%= flag("file-pencil", t(".flag_draft")) if node.draft %>
33 <%= flag("file-off", t(".flag_no_head")) unless node.head %>
34 </span>
35 <div class="title_body">
36 <div class="node_title"><%= link_to title_for_node(node), node_path(node) %></div>
37 <div class="node_path"><%= link_to_path(node.unique_name, node.unique_name) %></div>
38 </div>
39 </div>
30 </td> 40 </td>
31 <td class="actions"> 41 <td class="actions">
32 <%= link_to 'show', node_path(node) %> 42 <div class="action_grid">
33 <%= link_to 'edit', edit_node_path(node) %> 43 <span class="action_item">
34 <%= link_to 'revisions', node_revisions_path(node) %> 44 <%= link_to node_path(node), "aria-label" => t("admin.common.show"),
45 title: t("admin.common.show") do %>
46 <%= icon("eye", library: "tabler", "aria-hidden": true) %>
47 <% end %>
48 </span>
49 <span class="action_item">
50 <%= link_to node_revisions_path(node), "aria-label" => t("admin.common.revisions"),
51 title: t("admin.common.revisions") do %>
52 <%= icon("history", library: "tabler", "aria-hidden": true) %>
53 <% end %>
54 </span>
55 </div>
35 </td> 56 </td>
36 <td><%= node.lock_owner.login if node.lock_owner %></td> 57 <td><%= node.head ? node.head.revision : t(".no_revision") %></td>
37 <td><%= node.draft ? node.draft.revision : (node.head ? node.head.revision : t(".no_revision")) %></td>
38 </tr> 58 </tr>
39 <% end %> 59 <% end %>
40</table> 60</table>