From 409d71ed471703be8c56f2639a3ecb0fa387e6a7 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 4 Aug 2026 07:07:05 +0200 Subject: Give node lists a flag column and a shared action bar --- app/views/nodes/_node_list.html.erb | 40 +++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'app/views/nodes/_node_list.html.erb') 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 @@ <%= will_paginate @nodes %> - - <% @nodes.each do |node| %> "> - - - + <% end %>
<%= t("admin.columns.id") %> <%= t("admin.columns.title") %> <%= t("admin.columns.actions") %><%= t("admin.columns.locked_by") %> <%= t("admin.columns.rev") %>
<%= node.id %> -

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

-

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

+
+ + <%= flag("lock", t(".flag_locked", :login => node.lock_owner.login), + :tier => :attention) if node.lock_owner %> + <%= flag("calendar-clock", + t(".flag_embargo", :date => admin_datetime(node.head.published_at)), + :tier => :attention) if node.embargoed? %> + <%= flag("file-pencil", t(".flag_draft")) if node.draft %> + <%= flag("file-off", t(".flag_no_head")) unless node.head %> + +
+
<%= 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 'edit', edit_node_path(node) %> - <%= link_to 'revisions', node_revisions_path(node) %> +
+ + <%= link_to node_path(node), "aria-label" => t("admin.common.show"), + title: t("admin.common.show") do %> + <%= icon("eye", library: "tabler", "aria-hidden": true) %> + <% end %> + + + <%= link_to node_revisions_path(node), "aria-label" => t("admin.common.revisions"), + title: t("admin.common.revisions") do %> + <%= icon("history", library: "tabler", "aria-hidden": true) %> + <% end %> + +
<%= node.lock_owner.login if node.lock_owner %><%= node.draft ? node.draft.revision : (node.head ? node.head.revision : t(".no_revision")) %><%= node.head ? node.head.revision : t(".no_revision") %>
-- cgit v1.3