summaryrefslogtreecommitdiff
path: root/app/views/events
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-08-12 01:24:28 +0200
committererdgeist <erdgeist@erdgeist.org>2026-08-12 01:24:28 +0200
commit5f6f272b433ffb1ec0bda2a5e6d64709c4ac6f33 (patch)
treeeade981fb2d0b90797a0ae233eb4282305b6ef81 /app/views/events
parentdd2264fb24b457910a76fac486e40c0c7a46581c (diff)
Give the admin lists a shared table and row vocabulary
row_primary and row_secondary replace four names for a row's title and five for its supporting line, across the tables and the sitemap. Actions cells no longer sit flush against the row edge Header rows move into thead, which retires the .header class from the CSS, the tr.header:hover suppression, and .no_hover Replace variety of nodes_table, assets_table, events_table, revisions_table, user_table and sitemap with a shared class admin_table
Diffstat (limited to 'app/views/events')
-rw-r--r--app/views/events/index.html.erb132
1 files changed, 68 insertions, 64 deletions
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb
index 2497a577..3116dfc1 100644
--- a/app/views/events/index.html.erb
+++ b/app/views/events/index.html.erb
@@ -8,72 +8,76 @@
8 8
9<%= will_paginate @events %> 9<%= will_paginate @events %>
10 10
11<table class="events_table"> 11<table class="admin_table events_table">
12 <tr class="header"> 12 <thead>
13 <th><%= t("admin.columns.title") %></th> 13 <tr class="header">
14 <th><%= t(".when") %></th> 14 <th><%= t("admin.columns.title") %></th>
15 <th></th> 15 <th><%= t(".when") %></th>
16 </tr> 16 <th></th>
17 </tr>
18 </thead>
17 19
18<% @events.each do |event| %> 20 <tbody>
19 <tr> 21 <% @events.each do |event| %>
20 <td class="title"> 22 <tr>
21 <div class="title_with_flags"> 23 <td class="title">
22 <span class="flag_stack"> 24 <div class="title_with_flags">
23 <%= flag("hours-24", Event.human_attribute_name(:allday)) if event.allday %> 25 <span class="flag_stack">
24 <%= flag("sticker", t(".flag_own_title")) if event.title.present? %> 26 <%= flag("hours-24", Event.human_attribute_name(:allday)) if event.allday %>
25 </span> 27 <%= flag("sticker", t(".flag_own_title")) if event.title.present? %>
26 <div class="title_body"> 28 </span>
27 <div class="event_title"><%= link_to event.display_title, event %></div> 29 <div class="title_body">
28 <% if event.node %> 30 <div class="row_primary event_title"><%= link_to event.display_title, event %></div>
29 <div class="event_meta"> 31 <% if event.node %>
30 <%= icon("file", library: "tabler", "aria-hidden": true) %> 32 <div class="row_secondary event_meta">
31 <%= link_to event.node.unique_name, node_path(event.node) %> 33 <%= icon("file", library: "tabler", "aria-hidden": true) %>
32 </div> 34 <%= link_to event.node.unique_name, node_path(event.node) %>
33 <% end %> 35 </div>
34 <% if event.url.present? %> 36 <% end %>
35 <div class="event_meta"> 37 <% if event.url.present? %>
36 <%= icon("external-link", library: "tabler", "aria-hidden": true) %> 38 <div class="row_secondary event_meta">
37 <%= external_url_link(event.url) %> 39 <%= icon("external-link", library: "tabler", "aria-hidden": true) %>
38 </div> 40 <%= external_url_link(event.url) %>
39 <% end %> 41 </div>
42 <% end %>
43 </div>
40 </div> 44 </div>
41 </div> 45 </td>
42 </td> 46 <td class="event_when">
43 <td class="event_when"> 47 <div class="when_body">
44 <div class="when_body"> 48 <% if event.rrule.present? %>
45 <% if event.rrule.present? %> 49 <% if event.humanize_rrule %>
46 <% if event.humanize_rrule %> 50 <span title="<%= event.rrule %>"><%= event_schedule_text(event) %></span>
47 <span title="<%= event.rrule %>"><%= event_schedule_text(event) %></span> 51 <% else %>
48 <% else %> 52 <span class="rrule_raw" title="<%= event.rrule %>">
49 <span class="rrule_raw" title="<%= event.rrule %>"> 53 <%= t("events.schedule.unreadable") %>
50 <%= t("events.schedule.unreadable") %> 54 </span>
51 </span> 55 <% if event.start_time %>
52 <% if event.start_time %> 56 <div class="row_secondary event_meta"><%= admin_date(event.start_time) %></div>
53 <div class="event_meta"><%= admin_date(event.start_time) %></div> 57 <% end %>
54 <% end %> 58 <% end %>
59 <% else %>
60 <%= event_date_range(event) %>
55 <% end %> 61 <% end %>
56 <% else %> 62 </div>
57 <%= event_date_range(event) %> 63 </td>
58 <% end %> 64 <td class="actions">
59 </div> 65 <div class="action_grid">
60 </td> 66 <span class="action_item">
61 <td class="actions"> 67 <%= link_to event_path(event), "aria-label" => t("admin.common.show"),
62 <div class="action_grid"> 68 title: t("admin.common.show") do %>
63 <span class="action_item"> 69 <%= icon("eye", library: "tabler", "aria-hidden": true) %>
64 <%= link_to event_path(event), "aria-label" => t("admin.common.show"), 70 <% end %>
65 title: t("admin.common.show") do %> 71 </span>
66 <%= icon("eye", library: "tabler", "aria-hidden": true) %> 72 <span class="action_item">
67 <% end %> 73 <%= link_to edit_event_path(event), "aria-label" => t("admin.common.edit"),
68 </span> 74 title: t("admin.common.edit") do %>
69 <span class="action_item"> 75 <%= icon("edit", library: "tabler", "aria-hidden": true) %>
70 <%= link_to edit_event_path(event), "aria-label" => t("admin.common.edit"), 76 <% end %>
71 title: t("admin.common.edit") do %> 77 </span>
72 <%= icon("edit", library: "tabler", "aria-hidden": true) %> 78 </div>
73 <% end %> 79 </td>
74 </span> 80 </tr>
75 </div> 81 <% end %>
76 </td> 82 </tbody>
77 </tr>
78<% end %>
79</table> 83</table>