aboutsummaryrefslogtreecommitdiff
path: root/views/events_list.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/events_list.haml')
-rw-r--r--views/events_list.haml23
1 files changed, 12 insertions, 11 deletions
diff --git a/views/events_list.haml b/views/events_list.haml
index 008b667..ff56310 100644
--- a/views/events_list.haml
+++ b/views/events_list.haml
@@ -1,18 +1,19 @@
%h2
Events List
-%p
- %a{:href => "/events/list/#{(@start-1.day-10).strftime("%Y-%m-%d")}?"+request.query_string}
- ← Previous day
- = @start.strftime("%Y-%m-%d")
- %a{:href => "/events/list/#{(@start+1.day+10).strftime("%Y-%m-%d")}?"+request.query_string}
- Next day →
- |
- %a{:href => "/events/calendar/#{@start.strftime("%Y-%m")}?"+request.query_string}
- Calendar view
-= partial('events_form')
+- if @start
+ %p
+ %a{:href => "/events/list/#{(@start-1.day+1.hour).strftime("%F")}?"+request.query_string}
+ ← Previous day
+ = @start.strftime("%F")
+ %a{:href => "/events/list/#{(@start+1.day+1.hour).strftime("%F")}?"+request.query_string}
+ Next day →
+ |
+ %a{:href => "/events/calendar/#{@start.strftime("%Y-%m")}?"+request.query_string}
+ Calendar view
+ = partial('events_form')
- if @events.length > 0
= partial('history', :collection => @events)
- else
%p
%strong
- No events for today.
+ No events.