agenda-libre-ruby/app/views/events/index.html.haml

50 lines
1.6 KiB
Plaintext
Raw Normal View History

2015-02-15 17:10:17 +01:00
= render '/orgas/search'
= render '/regions/selector'
- if params[:year]
2013-12-29 17:45:53 +01:00
-# Whole year calendar
2015-11-10 23:29:05 +01:00
- @events = @events.year params[:year]
%header.calendar-header.year
= link_to '<<', year: params[:year].to_i - 1, tag: params[:tag],
region: params[:region]
2013-12-29 17:45:53 +01:00
= params[:year]
= link_to '>>', year: params[:year].to_i + 1, tag: params[:tag],
region: params[:region]
2013-12-29 17:45:53 +01:00
- (1..12).each do |i|
- params[:start_date] = "#{params[:year]}-#{i}-01"
2013-12-29 17:45:53 +01:00
2015-09-12 15:31:31 +02:00
= month_calendar do |date|
- capture_haml do
.day_number= date.day
%ul.events.fa-ul= render month_events(@events, date)
2015-09-12 15:31:31 +02:00
- else
-# One month calendar
2015-11-10 23:29:05 +01:00
- @events = @events.month params[:start_date] ||= Time.zone.today
2015-09-12 15:31:31 +02:00
= month_calendar do |date|
- capture_haml do
.day_number= date.day
%ul.events.fa-ul= render month_events(@events, date)
.formats
%em.fa.fa-rss
= raw t '.calendar_in',
rss: link_to('RSS', events_path(:rss,
tag: params[:tag], region: params[:region])),
webcal: link_to('webcal', events_path(tag: params[:tag],
protocol: 'webcal', format: :ics, region: params[:region])),
ical: link_to('iCal', events_path(:rss,
tag: params[:tag], format: :ics, region: params[:region]))
%a#banner(href='http://www.libre-en-fete.net')
= image_tag 'lef.png', width: '180', height: '60', alt: 'Libre en Fete'
/
%a#banner(href='http://april.org/campagne')
= image_tag 'priorite-logiciel-libre-je-soutiens-april_2_m.png',
width: '374', height: '48',
alt: 'Priorité au Logiciel Libre! Je soutiens l\'April.'
- set_events_meta