summaryrefslogtreecommitdiff
path: root/app/views/events/index.html.erb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-02 00:12:02 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-02 00:12:02 +0200
commitb6416e86c9c58b8e886c14de55b01aeb863b8676 (patch)
tree55a69ed46888e6a47ccc35a22cef45a33cddfd87 /app/views/events/index.html.erb
parentbf68c8fed6776cd40d859e6e968a251b4b934c8b (diff)
Clean up events views: return_to, subnav, remove custom_rrule
- events_controller: wire return_to through show and new actions; create respects return_to with fallback to node/event path; new pre-populates node_id and tag_list from params - events/edit: remove custom_rrule checkbox; node link removed from subnav (use show for node navigation); destroy button added - events/new: remove custom_rrule checkbox; add return_to hidden field and back link; tag_list field added - events/show: fix back link via safe_return_to; add node link to subnav; add destroy button; remove custom_rrule display; show humanized rrule below raw string - events/index: destructive class on destroy button; node_id column replaced with node link; show/edit links carry return_to - nodes/show: add show/edit links to event entries with return_to
Diffstat (limited to 'app/views/events/index.html.erb')
-rw-r--r--app/views/events/index.html.erb10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb
index 064fa860..d0458d71 100644
--- a/app/views/events/index.html.erb
+++ b/app/views/events/index.html.erb
@@ -3,7 +3,6 @@
3<table> 3<table>
4 <tr> 4 <tr>
5 <th>Title</th> 5 <th>Title</th>
6 <th>Is primary</th>
7 <th>Start time</th> 6 <th>Start time</th>
8 <th>End time</th> 7 <th>End time</th>
9 <th>Rrule</th> 8 <th>Rrule</th>
@@ -16,17 +15,16 @@
16<% @events.each do |event| %> 15<% @events.each do |event| %>
17 <tr> 16 <tr>
18 <td><%=h event.display_title %></td> 17 <td><%=h event.display_title %></td>
19 <td><%=h event.is_primary %></td>
20 <td><%=h event.start_time %></td> 18 <td><%=h event.start_time %></td>
21 <td><%=h event.end_time %></td> 19 <td><%=h event.end_time %></td>
22 <td><%=h event.rrule %></td> 20 <td><%=h event.rrule %></td>
23 <td><%=h event.custom_rrule %></td> 21 <td><%=h event.custom_rrule %></td>
24 <td><%=h event.allday %></td> 22 <td><%=h event.allday %></td>
25 <td><%=h event.url %></td> 23 <td><%=h event.url %></td>
26 <td><%=h event.node_id %></td> 24 <td><%= event.node ? link_to(event.node_id, node_path(event.node)) : '' %></td>
27 <td><%= link_to 'Show', event %></td> 25 <td><%= link_to 'show', event %></td>
28 <td><%= link_to 'Edit', edit_event_path(event) %></td> 26 <td><%= link_to 'edit', edit_event_path(event) %></td>
29 <td><%= button_to 'Destroy', event, method: :delete, form: { data: { confirm: 'Are you sure?' } } %></td> 27 <td><%= button_to 'destroy', event, method: :delete, form: { data: { confirm: 'Are you sure?' }, class: 'button_to destructive' } %></td>
30 </tr> 28 </tr>
31<% end %> 29<% end %>
32</table> 30</table>