summaryrefslogtreecommitdiff
path: root/app/views/users
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-03 18:08:58 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-03 18:08:58 +0200
commit5692777652a28ee66463fa4a4b79928fd90c79fc (patch)
tree710979256dc842fbd7c0a375dfa747a644d69243 /app/views/users
parent84657fa9d633a7d3e20c10645589061ecebeee3f (diff)
Share one flag stack between the account roster and the events list
Diffstat (limited to 'app/views/users')
-rw-r--r--app/views/users/_user.html.erb23
1 files changed, 7 insertions, 16 deletions
diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb
index aa65cc3d..be92ad1d 100644
--- a/app/views/users/_user.html.erb
+++ b/app/views/users/_user.html.erb
@@ -1,28 +1,19 @@
1<% users.each do |user| %> 1<% users.each do |user| %>
2<tr> 2<tr>
3 <td class="user_login"> 3 <td class="user_login">
4 <span class="user_flag_stack"> 4 <span class="flag_stack">
5 <% if user.otp_enrolled? %> 5 <% if user.otp_enrolled? %>
6 <span role="img" title="<%= t(".otp_enrolled") %>" aria-label="<%= t(".otp_enrolled") %>"> 6 <%= flag("shield-check", t(".otp_enrolled")) %>
7 <%= icon("shield-check", library: "tabler", "aria-hidden": true) %>
8 </span>
9 <% elsif user.otp_pending_secret.present? %> 7 <% elsif user.otp_pending_secret.present? %>
10 <span role="img" class="otp_missing" title="<%= t(".otp_pending") %>" aria-label="<%= t(".otp_pending") %>"> 8 <%= flag("shield-half", t(".otp_pending"), :tier => :attention) %>
11 <%= icon("shield-half", library: "tabler", "aria-hidden": true) %>
12 </span>
13 <% else %> 9 <% else %>
14 <span role="img" class="otp_missing" title="<%= t(".otp_missing") %>" aria-label="<%= t(".otp_missing") %>"> 10 <%= flag("shield-off", t(".otp_missing"), :tier => :attention) %>
15 <%= icon("shield-off", library: "tabler", "aria-hidden": true) %>
16 </span>
17 <% end %> 11 <% end %>
18 <% if (tier = user.staleness_tier) %> 12 <% if (tier = user.staleness_tier) %>
19 <% hint = tier == :never ? t(".stale_never") 13 <% hint = tier == :never ? t(".stale_never")
20 : t(".stale_#{tier}", :year => user.last_login_at.year) %> 14 : t(".stale_#{tier}", :year => user.last_login_at.year) %>
21 <span role="img" class="stale_flag stale_flag_<%= tier %>" 15 <%= flag(tier == :amber ? "clock-exclamation" : "alert-triangle", hint,
22 title="<%= hint %>" aria-label="<%= hint %>"> 16 :tier => tier == :amber ? :attention : :alert) %>
23 <%= icon(tier == :amber ? "clock-exclamation" : "alert-triangle",
24 library: "tabler", "aria-hidden": true) %>
25 </span>
26 <% end %> 17 <% end %>
27 </span> 18 </span>
28 <%= user.login %> 19 <%= user.login %>