summaryrefslogtreecommitdiff
path: root/app/views/custom
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-02 15:13:52 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-02 15:13:52 +0200
commit175b408948e601d3db568768a309eed8f2edb307 (patch)
treeeef1106f7fb857d26d08aa7fb9055d3c25ad207e /app/views/custom
parent9a3274345dc83096a9bdea612ec77cb2406fef21 (diff)
Add 'open today' sidebar widget and open days in chapter lists
- open_erfas_today helper: samples 3 random open-day-tagged occurrences of the current day; widget hidden entirely on days without open chapters; heading shows current weekday - content/_open_erfas_today partial rendered in right column above tags and featured articles - _chapter partial: open-day schedules (event_schedule_text) shown inline in aggregated chapter lists with 'Offene Tage' label - ccc.css: open_erfas_today added to existing right-column widget selector groups (headings, lists, links)
Diffstat (limited to 'app/views/custom')
-rw-r--r--app/views/custom/partials/_chapter.html.erb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/views/custom/partials/_chapter.html.erb b/app/views/custom/partials/_chapter.html.erb
index a5b8662..805559b 100644
--- a/app/views/custom/partials/_chapter.html.erb
+++ b/app/views/custom/partials/_chapter.html.erb
@@ -6,5 +6,14 @@
6 <% if page.node.external_url.present? %> 6 <% if page.node.external_url.present? %>
7 <div class="chapter_url"><%= link_to page.node.external_url, page.node.external_url, target: '_blank', rel: 'noopener' %></div> 7 <div class="chapter_url"><%= link_to page.node.external_url, page.node.external_url, target: '_blank', rel: 'noopener' %></div>
8 <% end %> 8 <% end %>
9 <% open_days = page.node.events.tagged_with('open-day').order(:start_time) %>
10 <% if open_days.any? %>
11 <div class="chapter_open_days">
12 <span class="open_days_label"><%= t(:open_days_label) %>: </span>
13 <% open_days.each do |event| %>
14 <span class="event_schedule"><%= event_schedule_text(event) %></span>
15 <% end %>
16 </div>
17 <% end %>
9 <p class="excerpt"><%= sanitize page.body %></p> 18 <p class="excerpt"><%= sanitize page.body %></p>
10</div> 19</div>