aboutsummaryrefslogtreecommitdiff
path: root/views/events_calendar.haml
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-11-30 22:48:13 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-11-30 22:48:13 +0000
commit45ae88e9087e87852f76bfbd62bcf6e66500da70 (patch)
tree2925d9aa72aaf5bdcfa57ee358e6237f831026eb /views/events_calendar.haml
parent494de72e43b0f294aed3b5006b0793ae3ab8a545 (diff)
Improved logic in the events calendar -- should be faster now.
Diffstat (limited to 'views/events_calendar.haml')
-rw-r--r--views/events_calendar.haml5
1 files changed, 2 insertions, 3 deletions
diff --git a/views/events_calendar.haml b/views/events_calendar.haml
index e3cec5e..0ff4e17 100644
--- a/views/events_calendar.haml
+++ b/views/events_calendar.haml
@@ -1,11 +1,10 @@
%h2
Events Calendar
-
%p
- %a{:href => "/events/calendar/#{(@month-31.days).strftime("%Y-%m")}?"+request.query_string}
+ %a{:href => "/events/calendar/#{(@month << 1).strftime("%Y-%m")}?"+request.query_string}
&larr; Previous Month
= @month.strftime("%b %Y")
- %a{:href => "/events/calendar/#{(@month+31.days).strftime("%Y-%m")}?"+request.query_string}
+ %a{:href => "/events/calendar/#{(@month >> 1).strftime("%Y-%m")}?"+request.query_string}
Next month &rarr;
= partial('events_form')
= partial('events_calendar')