aboutsummaryrefslogtreecommitdiff
path: root/views/_events_calendar_day.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/_events_calendar_day.haml')
-rw-r--r--views/_events_calendar_day.haml13
1 files changed, 7 insertions, 6 deletions
diff --git a/views/_events_calendar_day.haml b/views/_events_calendar_day.haml
index 1b42520..fa0c517 100644
--- a/views/_events_calendar_day.haml
+++ b/views/_events_calendar_day.haml
@@ -1,14 +1,15 @@
%td{:class => (@today.month % 2 == 0 ? "even" : "odd")}
%p.event_date
%a{:href => "/events/list/#{@today.strftime("%F")}?#{request.query_string}"}
- = @today.strftime(((@today - 1.day).month != @today.month) ? "%d %b" : "%d")
- =partial("history", :collection => events_calendar_day.first(10))
+ = @today.strftime(((@today - 1).month != @today.month) ? "%d %b" : "%d")
+ =partial("history", :collection => events_calendar_day.last(10).to_a.reverse)
%p
- - if events_calendar_day.length > 10
+ - n_events = events_calendar_day.count
+ - if n_events > 10
There are
- = events_calendar_day.length - 10
+ = n_events - 10
more events to display.
- - if events_calendar_day.length > 0
+ - if n_events > 0
%a{:href => "/events/list/#{@today.strftime("%F")}?#{request.query_string}"}
Show the whole day.
- - @today += 1.day
+ - @today += 1