summaryrefslogtreecommitdiff
path: root/app/views/events/show.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/show.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/show.html.erb')
-rw-r--r--app/views/events/show.html.erb16
1 files changed, 11 insertions, 5 deletions
diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb
index ba14a7d3..e206bc4c 100644
--- a/app/views/events/show.html.erb
+++ b/app/views/events/show.html.erb
@@ -1,6 +1,9 @@
1<% content_for :subnavigation do %> 1<% content_for :subnavigation do %>
2 <%= link_to 'back', edit_node_path(@event.node) %> 2 <% if @event.node %>
3 <%= link_to 'edit', edit_event_path(@event) %> 3 <%= link_to 'node', node_path(@event.node) %>
4 <% end %>
5 <%= link_to 'edit', edit_event_path(@event, return_to: request.path) %>
6 <%= button_to 'destroy', event_path(@event), method: :delete, form: { data: { confirm: 'Delete this event?' }, class: 'button_to destructive' } %>
4<% end %> 7<% end %>
5 8
6<h2>Event for node <%= @event.node.unique_name %></h2> 9<h2>Event for node <%= @event.node.unique_name %></h2>
@@ -18,11 +21,14 @@
18<p> 21<p>
19 <b>Rrule:</b> 22 <b>Rrule:</b>
20 <%=h @event.rrule %> 23 <%=h @event.rrule %>
24 <% if (human = @event.humanize_rrule(I18n.locale)) %>
25 <br/><small><em>( <%= human %></em> )</small>
26 <% end %>
21</p> 27</p>
22 28
23<p> 29<p>
24 <b>Custom rrule:</b> 30 <b>Tags:</b>
25 <%=h @event.custom_rrule %> 31 <%=h @event.tag_list %>
26</p> 32</p>
27 33
28<p> 34<p>
@@ -43,4 +49,4 @@
43<p> 49<p>
44 <b>Longitude:</b> 50 <b>Longitude:</b>
45 <%=h @event.longitude %> 51 <%=h @event.longitude %>
46</p> \ No newline at end of file 52</p>