From 5f6f272b433ffb1ec0bda2a5e6d64709c4ac6f33 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 12 Aug 2026 01:24:28 +0200 Subject: Give the admin lists a shared table and row vocabulary row_primary and row_secondary replace four names for a row's title and five for its supporting line, across the tables and the sitemap. Actions cells no longer sit flush against the row edge Header rows move into thead, which retires the .header class from the CSS, the tr.header:hover suppression, and .no_hover Replace variety of nodes_table, assets_table, events_table, revisions_table, user_table and sitemap with a shared class admin_table --- app/views/assets/index.html.erb | 114 ++++++++++++++++--------------- app/views/events/index.html.erb | 132 +++++++++++++++++++----------------- app/views/nodes/_node_list.html.erb | 76 +++++++++++---------- app/views/nodes/sitemap.html.erb | 4 +- app/views/revisions/index.html.erb | 8 +-- app/views/users/index.html.erb | 20 +++--- 6 files changed, 183 insertions(+), 171 deletions(-) (limited to 'app') diff --git a/app/views/assets/index.html.erb b/app/views/assets/index.html.erb index 84f096c2..c71607cf 100644 --- a/app/views/assets/index.html.erb +++ b/app/views/assets/index.html.erb @@ -8,59 +8,63 @@ <%= will_paginate @assets %> - - - - - - -<% @assets.each do |asset| %> - - - - - -<% end %> +
<%= t("admin.columns.preview") %><%= t("admin.columns.name") %>
- <% if asset.has_variant?(:thumb) %> - <%= link_to image_tag(asset.upload.url(:thumb), :alt => ""), asset, - :class => "asset_thumb_link" %> - <% end %> - -
- <%= link_to asset.name.presence || asset.upload_file_name, asset %> -
-
- <%= icon("external-link", library: "tabler", "aria-hidden": true) %> - <%= link_to asset.upload_file_name, asset.upload.url, - :target => "_blank", :rel => "noopener" %> -
-
- <%= asset.upload.content_type %> · - <%= number_to_human_size(asset.upload.size) %> -
-
-
- - <%= link_to asset, "aria-label" => t("admin.common.show"), - title: t("admin.common.show") do %> - <%= icon("eye", library: "tabler", "aria-hidden": true) %> - <% end %> - - - <%= link_to edit_asset_path(asset), "aria-label" => t("admin.common.edit"), - title: t("admin.common.edit") do %> - <%= icon("edit", library: "tabler", "aria-hidden": true) %> - <% end %> - - - <%= button_to asset, method: :delete, - form: { data: { confirm: t("admin.common.confirm_sure") }, - class: 'button_to destructive' }, - "aria-label" => t("admin.common.destroy"), - title: t("admin.common.destroy") do %> - <%= icon("trash", library: "tabler", "aria-hidden": true) %> - <% end %> - -
-
+ + + + + + + + + <% @assets.each do |asset| %> + + + + + + <% end %> +
<%= t("admin.columns.preview") %><%= t("admin.columns.name") %>
+ <% if asset.has_variant?(:thumb) %> + <%= link_to image_tag(asset.upload.url(:thumb), :alt => ""), asset, + :class => "asset_thumb_link" %> + <% end %> + +
+ <%= link_to asset.name.presence || asset.upload_file_name, asset %> +
+
+ <%= icon("external-link", library: "tabler", "aria-hidden": true) %> + <%= link_to asset.upload_file_name, asset.upload.url, + :target => "_blank", :rel => "noopener" %> +
+
+ <%= asset.upload.content_type %> · + <%= number_to_human_size(asset.upload.size) %> +
+
+
+ + <%= link_to asset, "aria-label" => t("admin.common.show"), + title: t("admin.common.show") do %> + <%= icon("eye", library: "tabler", "aria-hidden": true) %> + <% end %> + + + <%= link_to edit_asset_path(asset), "aria-label" => t("admin.common.edit"), + title: t("admin.common.edit") do %> + <%= icon("edit", library: "tabler", "aria-hidden": true) %> + <% end %> + + + <%= button_to asset, method: :delete, + form: { data: { confirm: t("admin.common.confirm_sure") }, + class: 'button_to destructive' }, + "aria-label" => t("admin.common.destroy"), + title: t("admin.common.destroy") do %> + <%= icon("trash", library: "tabler", "aria-hidden": true) %> + <% end %> + +
+
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 2497a577..3116dfc1 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb @@ -8,72 +8,76 @@ <%= will_paginate @events %> - - - - - - +
<%= t("admin.columns.title") %><%= t(".when") %>
+ + + + + + + -<% @events.each do |event| %> - - + <% @events.each do |event| %> + + - + - - -<% end %> + + + + + <% end %> +
<%= t("admin.columns.title") %><%= t(".when") %>
-
- - <%= flag("hours-24", Event.human_attribute_name(:allday)) if event.allday %> - <%= flag("sticker", t(".flag_own_title")) if event.title.present? %> - -
-
<%= link_to event.display_title, event %>
- <% if event.node %> -
- <%= icon("file", library: "tabler", "aria-hidden": true) %> - <%= link_to event.node.unique_name, node_path(event.node) %> -
- <% end %> - <% if event.url.present? %> -
- <%= icon("external-link", library: "tabler", "aria-hidden": true) %> - <%= external_url_link(event.url) %> -
- <% end %> +
+
+ + <%= flag("hours-24", Event.human_attribute_name(:allday)) if event.allday %> + <%= flag("sticker", t(".flag_own_title")) if event.title.present? %> + +
+
<%= link_to event.display_title, event %>
+ <% if event.node %> +
+ <%= icon("file", library: "tabler", "aria-hidden": true) %> + <%= link_to event.node.unique_name, node_path(event.node) %> +
+ <% end %> + <% if event.url.present? %> +
+ <%= icon("external-link", library: "tabler", "aria-hidden": true) %> + <%= external_url_link(event.url) %> +
+ <% end %> +
- -
-
- <% if event.rrule.present? %> - <% if event.humanize_rrule %> - <%= event_schedule_text(event) %> - <% else %> - - <%= t("events.schedule.unreadable") %> - - <% if event.start_time %> -
<%= admin_date(event.start_time) %>
+
+
+ <% if event.rrule.present? %> + <% if event.humanize_rrule %> + <%= event_schedule_text(event) %> + <% else %> + + <%= t("events.schedule.unreadable") %> + + <% if event.start_time %> +
<%= admin_date(event.start_time) %>
+ <% end %> <% end %> + <% else %> + <%= event_date_range(event) %> <% end %> - <% else %> - <%= event_date_range(event) %> - <% end %> -
-
-
- - <%= link_to event_path(event), "aria-label" => t("admin.common.show"), - title: t("admin.common.show") do %> - <%= icon("eye", library: "tabler", "aria-hidden": true) %> - <% end %> - - - <%= link_to edit_event_path(event), "aria-label" => t("admin.common.edit"), - title: t("admin.common.edit") do %> - <%= icon("edit", library: "tabler", "aria-hidden": true) %> - <% end %> - -
-
+
+ + <%= link_to event_path(event), "aria-label" => t("admin.common.show"), + title: t("admin.common.show") do %> + <%= icon("eye", library: "tabler", "aria-hidden": true) %> + <% end %> + + + <%= link_to edit_event_path(event), "aria-label" => t("admin.common.edit"), + title: t("admin.common.edit") do %> + <%= icon("edit", library: "tabler", "aria-hidden": true) %> + <% end %> + +
+
diff --git a/app/views/nodes/_node_list.html.erb b/app/views/nodes/_node_list.html.erb index 55f396b7..1a0c4797 100644 --- a/app/views/nodes/_node_list.html.erb +++ b/app/views/nodes/_node_list.html.erb @@ -4,43 +4,45 @@ (params[:tags].present? ? [["tags", params[:tags]]] : []) %> <%= will_paginate @nodes %> - - <% @nodes.each do |node| %> - "> -
-
- - <%= 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("world-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) %>
+ + + <% @nodes.each do |node| %> + "> + - - - <% end %> + + + + <% end %> +
+
+ + <%= 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("world-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 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 %> - -
-
+
+ + <%= 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 %> + +
+
<%= will_paginate @nodes %> diff --git a/app/views/nodes/sitemap.html.erb b/app/views/nodes/sitemap.html.erb index 3b9328da..95ed544f 100644 --- a/app/views/nodes/sitemap.html.erb +++ b/app/views/nodes/sitemap.html.erb @@ -26,8 +26,8 @@ <%= flag("file-text-shield", t(".flag_restricted"), :tier => :attention) if node.restricted? %>
-
<%= link_to title_for_node(node), node_path(node) %>
-
+
<%= link_to title_for_node(node), node_path(node) %>
+
<%= world_icon %> <%= link_to_path(node.unique_name, node.unique_name) %>
diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb index 3fb33b90..09eac565 100644 --- a/app/views/revisions/index.html.erb +++ b/app/views/revisions/index.html.erb @@ -18,7 +18,7 @@

<% end %> - +
@@ -30,7 +30,7 @@ - +
<%= t(".first") %>
<%= button_to t(".diff_revisions"), diff_node_revisions_path(@node), method: :post, @@ -64,7 +64,7 @@
- +<% end %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 71102c2c..e6c1fbda 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -13,15 +13,17 @@ <%= members.size %> <% if members.any? %> - "> - - - - - - - - <%= render :partial => "user", :locals => { :users => members } %> +
<%= t("users.labels.login") %><%= t("users.labels.roles") %>
"> + + + + + + + + + <%= render :partial => "user", :locals => { :users => members } %> +
<%= t("users.labels.login") %><%= t("users.labels.roles") %>
<% else %>

<%= t(".group_empty") %>

-- cgit v1.3