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/users/_user.html.erb | 6 +++--- app/views/users/index.html.erb | 18 +++++++----------- 2 files changed, 10 insertions(+), 14 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb index 028ee02f..e70c7032 100644 --- a/app/views/users/_user.html.erb +++ b/app/views/users/_user.html.erb @@ -79,7 +79,7 @@ form: { data: { confirm: t(".confirm_revoke_redaktion", :login => user.login) }, class: 'button_to destructive' }, "aria-label" => t(".revoke_redaktion"), title: t(".revoke_redaktion") do %> - <%= icon("user-minus", library: "tabler", "aria-hidden": true) %> + <%= icon("users-minus", library: "tabler", "aria-hidden": true) %> <% end %> <% end %> <% elsif user.otp_enrolled? %> @@ -87,13 +87,13 @@ form: { data: { confirm: t(".confirm_grant_redaktion", :login => user.login) }, class: 'button_to state_changing' }, "aria-label" => t(".grant_redaktion"), title: t(".grant_redaktion") do %> - <%= icon("user-plus", library: "tabler", "aria-hidden": true) %> + <%= icon("users-plus", library: "tabler", "aria-hidden": true) %> <% end %> <% else %> <% end %> <% end %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 2936bbea..71102c2c 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,14 +1,10 @@ -

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

- -

- <% UsersController::ROLE_PRESETS.each_key do |preset| %> - <%= link_to new_user_path(:preset => preset), class: 'action_button' do %> - <%= icon("plus", library: "tabler", "aria-hidden": true) %> - <%= t(".create_#{preset}") %> - <% end %> - <% end %> -

-

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

+<%= render "shared/page_actions", + :title => t(".title"), + :icon_name => "user-plus", + :label => t(".create_account"), + :options => UsersController::ROLE_PRESETS.each_key.map { |preset| + [t(".create_#{preset}"), new_user_path(:preset => preset)] }, + :hint => t(".admin_hint") %> <% UsersController::GROUP_ORDER.each do |group| %> <% members = @users[group] || [] %> -- cgit v1.3