mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
50 lines
1.9 KiB
Text
50 lines
1.9 KiB
Text
<% if upcoming_matches.size > 0 %>
|
|
<div class="widget calendar">
|
|
<h4><%= t('widget.schedule') %></h4>
|
|
|
|
<div class="widget-content-wrapper">
|
|
<% upcoming_matches.group_by{ |e| e.start.date_time.month }.each do |month, events| %>
|
|
<% events.group_by { |e| e.start.date_time.day }.each do |day, day_events| %>
|
|
<div class="separator"><%= event_start_time(day_events.first).strftime("%A, %e %B") %></div>
|
|
<% day_events.each do |event| %>
|
|
<div class="entry">
|
|
<p class="summary">
|
|
<span class="time"><%= event_start_time(event).strftime("%H:%M %Z") %></span>
|
|
<%= event.summary %><% if event.description %>
|
|
<%= link_to event.description, event.description %>
|
|
<% else %>
|
|
(no caster yet)
|
|
<% end %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<% if upcoming_nsltv.size > 0 %>
|
|
<div class="widget calendar">
|
|
<h4>NSLTV</h4>
|
|
|
|
<div class="widget-content-wrapper">
|
|
<% upcoming_nsltv.group_by{ |e| e.start.date_time.month }.each do |month, events| %>
|
|
<% events.group_by { |e| e.start.date_time.day }.each do |day, day_events| %>
|
|
<div class="separator"><%= event_start_time(day_events.first).strftime("%A, %e %B") %></div>
|
|
<% day_events.each do |event| %>
|
|
<div class="entry">
|
|
<p class="summary">
|
|
<span class="time"><%= event_start_time(event).strftime("%H:%M %Z") %></span>
|
|
<%= event.summary %><% if event.description %>
|
|
<%= link_to event.description, event.description %>
|
|
<% else %>
|
|
(no caster yet)
|
|
<% end %>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|