summaryrefslogtreecommitdiff
path: root/app/views/users
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/users')
-rw-r--r--app/views/users/_user.html.erb51
1 files changed, 37 insertions, 14 deletions
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 @@
8 <span class="field_hint"><%= t(".no_roles") %></span> 8 <span class="field_hint"><%= t(".no_roles") %></span>
9 <% end %> 9 <% end %>
10 </td> 10 </td>
11 <td><%= link_to t("admin.common.show"), user_path(user) %></td> 11 <td class="user_action">
12 <td> 12 <%= link_to user_path(user), "aria-label" => t("admin.common.show"),
13 title: t("admin.common.show") do %>
14 <%= icon("eye", library: "tabler", "aria-hidden": true) %>
15 <% end %>
16 </td>
17 <td class="user_action">
13 <% if current_user.admin? || current_user == user %> 18 <% if current_user.admin? || current_user == user %>
14 <%= link_to t("admin.common.edit"), edit_user_path(user) %> 19 <%= link_to edit_user_path(user), "aria-label" => t("admin.common.edit"),
20 title: t("admin.common.edit") do %>
21 <%= icon("edit", library: "tabler", "aria-hidden": true) %>
22 <% end %>
15 <% end %> 23 <% end %>
16 </td> 24 </td>
17 <td> 25 <td class="user_action">
18 <% if current_user.admin? && current_user != user %> 26 <% if current_user.admin? && current_user != user %>
19 <% if user.alumni? %> 27 <% if user.alumni? %>
20 <%= button_to t(".reactivate"), reactivate_user_path(user), method: :put, 28 <%= button_to reactivate_user_path(user), method: :put,
21 form: { class: 'button_to state_changing' } %> 29 form: { class: 'button_to state_changing' },
30 "aria-label" => t(".reactivate"), title: t(".reactivate") do %>
31 <%= icon("user-check", library: "tabler", "aria-hidden": true) %>
32 <% end %>
22 <% else %> 33 <% else %>
23 <%= button_to t(".deactivate"), deactivate_user_path(user), method: :put, 34 <%= button_to deactivate_user_path(user), method: :put,
24 form: { data: { confirm: t(".confirm_deactivate", :login => user.login) }, 35 form: { data: { confirm: t(".confirm_deactivate", :login => user.login) },
25 class: 'button_to destructive' } %> 36 class: 'button_to destructive' },
37 "aria-label" => t(".deactivate"), title: t(".deactivate") do %>
38 <%= icon("user-off", library: "tabler", "aria-hidden": true) %>
39 <% end %>
26 <% end %> 40 <% end %>
27 <% end %> 41 <% end %>
28 </td> 42 </td>
29 <td> 43 <td class="user_action">
30 <% if current_user.redaktion? && !user.alumni? %> 44 <% if current_user.redaktion? && !user.alumni? %>
31 <% if user.redaktion? %> 45 <% if user.redaktion? %>
32 <% unless user == current_user %> 46 <% unless user == current_user %>
33 <%= button_to t(".revoke_redaktion"), revoke_redaktion_user_path(user), method: :put, 47 <%= button_to revoke_redaktion_user_path(user), method: :put,
34 form: { data: { confirm: t(".confirm_revoke_redaktion", :login => user.login) }, 48 form: { data: { confirm: t(".confirm_revoke_redaktion", :login => user.login) },
35 class: 'button_to destructive' } %> 49 class: 'button_to destructive' },
50 "aria-label" => t(".revoke_redaktion"), title: t(".revoke_redaktion") do %>
51 <%= icon("user-minus", library: "tabler", "aria-hidden": true) %>
52 <% end %>
36 <% end %> 53 <% end %>
37 <% elsif user.otp_enrolled? %> 54 <% elsif user.otp_enrolled? %>
38 <%= button_to t(".grant_redaktion"), grant_redaktion_user_path(user), method: :put, 55 <%= button_to grant_redaktion_user_path(user), method: :put,
39 form: { data: { confirm: t(".confirm_grant_redaktion", :login => user.login) }, 56 form: { data: { confirm: t(".confirm_grant_redaktion", :login => user.login) },
40 class: 'button_to state_changing' } %> 57 class: 'button_to state_changing' },
58 "aria-label" => t(".grant_redaktion"), title: t(".grant_redaktion") do %>
59 <%= icon("user-plus", library: "tabler", "aria-hidden": true) %>
60 <% end %>
41 <% else %> 61 <% else %>
42 <span class="field_hint"><%= t(".needs_otp") %></span> 62 <span class="field_hint" title="<%= t(".needs_otp") %>"
63 aria-label="<%= t(".needs_otp") %>">
64 <%= icon("shield-off", library: "tabler", "aria-hidden": true) %>
65 </span>
43 <% end %> 66 <% end %>
44 <% end %> 67 <% end %>
45 </td> 68 </td>