From 52e260a4d7e3ac93c203bda716c37207d5f6cbbb Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 1 Aug 2026 13:29:09 +0200 Subject: Fix some spacing issues in user table and the wrapper --- app/views/users/_user.html.erb | 51 ++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 14 deletions(-) (limited to 'app/views/users/_user.html.erb') diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb index ba82375d..c9b21f0a 100644 --- a/app/views/users/_user.html.erb +++ b/app/views/users/_user.html.erb @@ -8,38 +8,61 @@ <%= t(".no_roles") %> <% end %> - <%= link_to t("admin.common.show"), user_path(user) %> - + + <%= link_to user_path(user), "aria-label" => t("admin.common.show"), + title: t("admin.common.show") do %> + <%= icon("eye", library: "tabler", "aria-hidden": true) %> + <% end %> + + <% if current_user.admin? || current_user == user %> - <%= link_to t("admin.common.edit"), edit_user_path(user) %> + <%= link_to edit_user_path(user), "aria-label" => t("admin.common.edit"), + title: t("admin.common.edit") do %> + <%= icon("edit", library: "tabler", "aria-hidden": true) %> + <% end %> <% end %> - + <% if current_user.admin? && current_user != user %> <% if user.alumni? %> - <%= button_to t(".reactivate"), reactivate_user_path(user), method: :put, - form: { class: 'button_to state_changing' } %> + <%= button_to reactivate_user_path(user), method: :put, + form: { class: 'button_to state_changing' }, + "aria-label" => t(".reactivate"), title: t(".reactivate") do %> + <%= icon("user-check", library: "tabler", "aria-hidden": true) %> + <% end %> <% else %> - <%= button_to t(".deactivate"), deactivate_user_path(user), method: :put, + <%= button_to deactivate_user_path(user), method: :put, form: { data: { confirm: t(".confirm_deactivate", :login => user.login) }, - class: 'button_to destructive' } %> + class: 'button_to destructive' }, + "aria-label" => t(".deactivate"), title: t(".deactivate") do %> + <%= icon("user-off", library: "tabler", "aria-hidden": true) %> + <% end %> <% end %> <% end %> - + <% if current_user.redaktion? && !user.alumni? %> <% if user.redaktion? %> <% unless user == current_user %> - <%= button_to t(".revoke_redaktion"), revoke_redaktion_user_path(user), method: :put, + <%= button_to revoke_redaktion_user_path(user), method: :put, form: { data: { confirm: t(".confirm_revoke_redaktion", :login => user.login) }, - class: 'button_to destructive' } %> + class: 'button_to destructive' }, + "aria-label" => t(".revoke_redaktion"), title: t(".revoke_redaktion") do %> + <%= icon("user-minus", library: "tabler", "aria-hidden": true) %> + <% end %> <% end %> <% elsif user.otp_enrolled? %> - <%= button_to t(".grant_redaktion"), grant_redaktion_user_path(user), method: :put, + <%= button_to grant_redaktion_user_path(user), method: :put, form: { data: { confirm: t(".confirm_grant_redaktion", :login => user.login) }, - class: 'button_to state_changing' } %> + class: 'button_to state_changing' }, + "aria-label" => t(".grant_redaktion"), title: t(".grant_redaktion") do %> + <%= icon("user-plus", library: "tabler", "aria-hidden": true) %> + <% end %> <% else %> - <%= t(".needs_otp") %> + " + aria-label="<%= t(".needs_otp") %>"> + <%= icon("shield-off", library: "tabler", "aria-hidden": true) %> + <% end %> <% end %> -- cgit v1.3