2014-08-10 23:10:40 +00:00
|
|
|
<% if upcoming_matches.size > 0 %>
|
|
|
|
<div class="widget calendar">
|
|
|
|
<h4><%= t('widget.schedule') %></h4>
|
2014-04-01 23:07:21 +00:00
|
|
|
|
2015-07-18 10:33:09 +00:00
|
|
|
<div class="widget-content-wrapper">
|
2017-04-02 23:02:09 +00:00
|
|
|
<% 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>
|
2014-08-10 23:10:40 +00:00
|
|
|
<% day_events.each do |event| %>
|
|
|
|
<div class="entry">
|
|
|
|
<p class="summary">
|
2017-04-02 23:02:09 +00:00
|
|
|
<span class="time"><%= event_start_time(event).strftime("%H:%M %Z") %></span>
|
2017-04-04 10:11:36 +00:00
|
|
|
<%= event.summary %><% if event.description %>
|
|
|
|
<%= link_to event.description, event.description %>
|
|
|
|
<% else %>
|
|
|
|
(no caster yet)
|
|
|
|
<% end %>
|
2014-08-10 23:10:40 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2014-04-06 14:14:03 +00:00
|
|
|
<% end %>
|
2014-08-10 23:10:40 +00:00
|
|
|
</div>
|
2014-04-06 14:14:03 +00:00
|
|
|
</div>
|
2014-08-10 23:10:40 +00:00
|
|
|
<% end %>
|
2015-07-18 10:33:09 +00:00
|
|
|
<% if upcoming_nsltv.size > 0 %>
|
|
|
|
<div class="widget calendar">
|
|
|
|
<h4>NSLTV</h4>
|
|
|
|
|
|
|
|
<div class="widget-content-wrapper">
|
2017-04-02 23:02:09 +00:00
|
|
|
<% 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>
|
2015-07-18 10:33:09 +00:00
|
|
|
<% day_events.each do |event| %>
|
|
|
|
<div class="entry">
|
|
|
|
<p class="summary">
|
2017-04-02 23:02:09 +00:00
|
|
|
<span class="time"><%= event_start_time(event).strftime("%H:%M %Z") %></span>
|
2017-04-04 10:16:32 +00:00
|
|
|
<%= event.summary %><% if event.description %>
|
|
|
|
<%= link_to event.description, event.description %>
|
|
|
|
<% else %>
|
|
|
|
(no caster yet)
|
|
|
|
<% end %>
|
2015-07-18 10:33:09 +00:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|