summaryrefslogtreecommitdiff
path: root/app/views/events
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-30 03:55:42 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-30 19:22:24 +0200
commit51629c5c42270a346885057a441095c964101cc1 (patch)
treec2eaf148feb443ef51b20d3147fc9e368239ab12 /app/views/events
parent4705ef970469a852c7bdb4c097ba748e972c8f63 (diff)
Fix events CRUD for standalone events and add events to admin menu
- event_params now permits title, description, is_primary - event_information helper lists all node.events, not just the first - Occurrence.generate handles nil node (standalone events) - Page.aggregate order_by title uses correlated subquery to avoid GROUP BY conflict with tag-filter path; order_direction whitelisted to ASC/DESC to prevent SQL injection - Events link added to admin menu bar - events/index shows title, is_primary; drops latitude/longitude columns
Diffstat (limited to 'app/views/events')
-rw-r--r--app/views/events/index.html.erb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb
index 19b21ce8..064fa860 100644
--- a/app/views/events/index.html.erb
+++ b/app/views/events/index.html.erb
@@ -2,27 +2,27 @@
2 2
3<table> 3<table>
4 <tr> 4 <tr>
5 <th>Title</th>
6 <th>Is primary</th>
5 <th>Start time</th> 7 <th>Start time</th>
6 <th>End time</th> 8 <th>End time</th>
7 <th>Rrule</th> 9 <th>Rrule</th>
8 <th>Custom rrule</th> 10 <th>Custom rrule</th>
9 <th>Allday</th> 11 <th>Allday</th>
10 <th>Url</th> 12 <th>Url</th>
11 <th>Latitude</th>
12 <th>Longitude</th>
13 <th>Node</th> 13 <th>Node</th>
14 </tr> 14 </tr>
15 15
16<% @events.each do |event| %> 16<% @events.each do |event| %>
17 <tr> 17 <tr>
18 <td><%=h event.display_title %></td>
19 <td><%=h event.is_primary %></td>
18 <td><%=h event.start_time %></td> 20 <td><%=h event.start_time %></td>
19 <td><%=h event.end_time %></td> 21 <td><%=h event.end_time %></td>
20 <td><%=h event.rrule %></td> 22 <td><%=h event.rrule %></td>
21 <td><%=h event.custom_rrule %></td> 23 <td><%=h event.custom_rrule %></td>
22 <td><%=h event.allday %></td> 24 <td><%=h event.allday %></td>
23 <td><%=h event.url %></td> 25 <td><%=h event.url %></td>
24 <td><%=h event.latitude %></td>
25 <td><%=h event.longitude %></td>
26 <td><%=h event.node_id %></td> 26 <td><%=h event.node_id %></td>
27 <td><%= link_to 'Show', event %></td> 27 <td><%= link_to 'Show', event %></td>
28 <td><%= link_to 'Edit', edit_event_path(event) %></td> 28 <td><%= link_to 'Edit', edit_event_path(event) %></td>