From 4705ef970469a852c7bdb4c097ba748e972c8f63 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 29 Jun 2026 16:26:31 +0200 Subject: Add chapter_detail template with events and external URL rendering New public page template for erfa and chaostreff nodes. Renders the node's external_url and lists associated events below the page content. Seed script updated to set template_name: 'chapter_detail' on all chapter drafts so the template is applied on publish. --- .../page_templates/public/chapter_detail.html.erb | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/views/custom/page_templates/public/chapter_detail.html.erb (limited to 'app') diff --git a/app/views/custom/page_templates/public/chapter_detail.html.erb b/app/views/custom/page_templates/public/chapter_detail.html.erb new file mode 100644 index 0000000..71352d3 --- /dev/null +++ b/app/views/custom/page_templates/public/chapter_detail.html.erb @@ -0,0 +1,23 @@ +
+

<%= @page.title %>

+ <% if @page.node.external_url.present? %> +
<%= link_to @page.node.external_url, @page.node.external_url, target: '_blank', rel: 'noopener' %>
+ <% end %> +

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

+ <%= aggregate?(@page.body) %> + <% if @page.node.events.any? %> +
+

Events

+
    + <% @page.node.events.order(:start_time).each do |event| %> +
  • + <%= event.display_title %> + <% if event.rrule.present? %> + <%= event.rrule %> + <% end %> +
  • + <% end %> +
+
+ <% end %> +
-- cgit v1.3