From f7c3bf9e6869331be0c33c0cd24246c592bf0dff Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 2 Jul 2026 00:12:30 +0200 Subject: Rewrite chapter_detail template with humanized event schedule - Split events into open-day tagged events (prominent, via tagged_with) and other events (secondary listing) - Use event_schedule_text helper for humanized recurrence + start time rather than raw rrule string - Section headings via i18n open_days / upcoming_events keys --- .../page_templates/public/chapter_detail.html.erb | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/app/views/custom/page_templates/public/chapter_detail.html.erb b/app/views/custom/page_templates/public/chapter_detail.html.erb index 71352d3..f47353c 100644 --- a/app/views/custom/page_templates/public/chapter_detail.html.erb +++ b/app/views/custom/page_templates/public/chapter_detail.html.erb @@ -5,16 +5,26 @@ <% end %>

<%= sanitize(@page.abstract) %>

<%= aggregate?(@page.body) %> - <% if @page.node.events.any? %> + <% open_days = @page.node.events.tagged_with('open-day').order(:start_time) %> + <% other_events = @page.node.events.where.not(id: open_days.map(&:id)).order(:start_time) %> + <% if open_days.any? %> +
+

<%= t(:open_days) %>

+ +
+ <% end %> + <% if other_events.any? %>
-

Events

+

<%= t(:upcoming_events) %>

-- cgit v1.3