From ac01156d00b24d14225c8e75979fb59bba69640d Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 4 Aug 2026 17:13:18 +0200 Subject: Tidy up headings on house keeping views - Collapse page headers into one action row with an optional hint - limit will_paginate to one row --- app/views/shared/_page_actions.html.erb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 app/views/shared/_page_actions.html.erb (limited to 'app/views/shared/_page_actions.html.erb') diff --git a/app/views/shared/_page_actions.html.erb b/app/views/shared/_page_actions.html.erb new file mode 100644 index 00000000..66aeb785 --- /dev/null +++ b/app/views/shared/_page_actions.html.erb @@ -0,0 +1,32 @@ +
+

<%= title %>

+ + <% if options.size == 1 %> + <%= link_to options.first.last, class: "action_button", + "aria-label" => options.first.first, title: options.first.first do %> + <%= icon(icon_name, library: "tabler", "aria-hidden": true) %> + <% end %> + <% else %> +
+
+ + <%= icon(icon_name, library: "tabler", "aria-hidden": true) %> + <%= icon("chevron-down", library: "tabler", "aria-hidden": true) %> + +
+ <% options.each do |option_label, path| %> + <%= link_to option_label, path, class: "action_button" %> + <% end %> +
+
+ + <% if local_assigns[:hint].present? %> +
+ " + title="<%= t("admin.common.explain") %>">? +

<%= hint %>

+
+ <% end %> +
+ <% end %> +
-- cgit v1.3