diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-03 18:08:58 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-03 18:08:58 +0200 |
| commit | 5692777652a28ee66463fa4a4b79928fd90c79fc (patch) | |
| tree | 710979256dc842fbd7c0a375dfa747a644d69243 /app/views | |
| parent | 84657fa9d633a7d3e20c10645589061ecebeee3f (diff) | |
Share one flag stack between the account roster and the events list
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/events/index.html.erb | 9 | ||||
| -rw-r--r-- | app/views/users/_user.html.erb | 23 |
2 files changed, 13 insertions, 19 deletions
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb index 7dfb854c..d07d6f82 100644 --- a/app/views/events/index.html.erb +++ b/app/views/events/index.html.erb | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | <th><%= Event.human_attribute_name(:start_time) %></th> | 15 | <th><%= Event.human_attribute_name(:start_time) %></th> |
| 16 | <th><%= Event.human_attribute_name(:end_time) %></th> | 16 | <th><%= Event.human_attribute_name(:end_time) %></th> |
| 17 | <th><%= Event.human_attribute_name(:rrule) %></th> | 17 | <th><%= Event.human_attribute_name(:rrule) %></th> |
| 18 | <th><%= Event.human_attribute_name(:allday) %></th> | ||
| 19 | <th><%= Event.human_attribute_name(:url) %></th> | 18 | <th><%= Event.human_attribute_name(:url) %></th> |
| 20 | <th><%= Event.human_attribute_name(:start_node) %></th> | 19 | <th><%= Event.human_attribute_name(:start_node) %></th> |
| 21 | <th></th> | 20 | <th></th> |
| @@ -23,11 +22,15 @@ | |||
| 23 | 22 | ||
| 24 | <% @events.each do |event| %> | 23 | <% @events.each do |event| %> |
| 25 | <tr> | 24 | <tr> |
| 26 | <td><%= link_to event.display_title, event %></td> | 25 | <td> |
| 26 | <span class="flag_stack"> | ||
| 27 | <%= flag("clock-off", Event.human_attribute_name(:allday)) if event.allday %> | ||
| 28 | </span> | ||
| 29 | <%= link_to event.display_title, event %> | ||
| 30 | </td> | ||
| 27 | <td><%= admin_datetime(event.start_time) %></td> | 31 | <td><%= admin_datetime(event.start_time) %></td> |
| 28 | <td><%= admin_datetime(event.end_time) %></td> | 32 | <td><%= admin_datetime(event.end_time) %></td> |
| 29 | <td class="rrule_cell"><span class="rrule_text"><%= rrule_with_break_opportunities(event.rrule) %></span></td> | 33 | <td class="rrule_cell"><span class="rrule_text"><%= rrule_with_break_opportunities(event.rrule) %></span></td> |
| 30 | <td><%= t("admin.common.#{event.allday ? "yes" : "no"}") %></td> | ||
| 31 | <td class="url_cell"><span class="truncate"><%= external_url_link(event.url) %></span></td> | 34 | <td class="url_cell"><span class="truncate"><%= external_url_link(event.url) %></span></td> |
| 32 | <td><%= event.node ? link_to(event.node.unique_name, node_path(event.node)) : "" %></td> | 35 | <td><%= event.node ? link_to(event.node.unique_name, node_path(event.node)) : "" %></td> |
| 33 | <td><%= link_to t(".edit_link"), edit_event_path(event) %></td> | 36 | <td><%= link_to t(".edit_link"), edit_event_path(event) %></td> |
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 %> |
