2015-02-15 17:10:17 +01:00
|
|
|
= render '/orgas/search'
|
2014-10-19 00:40:22 +02:00
|
|
|
= render '/regions/selector'
|
2014-08-16 12:35:51 +02:00
|
|
|
|
2014-06-27 00:52:47 +02:00
|
|
|
- if params[:year]
|
2013-12-29 17:45:53 +01:00
|
|
|
-# Whole year calendar
|
2014-08-09 18:59:11 +02:00
|
|
|
- @events = @events.year params[:year].to_i
|
2014-06-27 00:52:47 +02:00
|
|
|
%header.calendar-header.year
|
2014-12-28 16:54:58 +01:00
|
|
|
= link_to '<<', year: params[:year].to_i - 1, tag: params[:tag],
|
|
|
|
region: params[:region]
|
2013-12-29 17:45:53 +01:00
|
|
|
= params[:year]
|
2014-12-28 16:54:58 +01:00
|
|
|
= 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|
|
2014-06-27 00:52:47 +02:00
|
|
|
- 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
|
|
|
|
- @events.select { |e| (e.start_time.to_date..e.end_time.to_date).cover? date }
|
|
|
|
- .sort_by { |e| e.city }.each do |event|
|
|
|
|
%li.event{ title: display_date(event) }
|
|
|
|
- if event.locality?
|
|
|
|
%em.locality.fa.fa-globe
|
|
|
|
= link_to event do
|
|
|
|
%strong.city{ title: event.address }= event.city
|
|
|
|
= event.title
|
|
|
|
|
|
|
|
- else
|
|
|
|
-# One month calendar
|
|
|
|
- @events = @events.month params[:start_date].try :to_date
|
|
|
|
= month_calendar do |date|
|
|
|
|
- capture_haml do
|
2014-06-27 00:52:47 +02:00
|
|
|
.day_number= date.day
|
2014-09-28 12:53:17 +02:00
|
|
|
%ul.events.fa-ul
|
2015-09-12 15:31:31 +02:00
|
|
|
- @events.select { |e| (e.start_time.to_date..e.end_time.to_date).cover? date }
|
2014-08-16 23:35:22 +02:00
|
|
|
- .sort_by { |e| e.city }.each do |event|
|
2014-12-28 16:54:58 +01:00
|
|
|
%li.event{ title: display_date(event) }
|
2014-09-28 12:53:17 +02:00
|
|
|
- if event.locality?
|
2014-12-28 16:54:58 +01:00
|
|
|
%em.locality.fa.fa-globe
|
2014-06-27 00:52:47 +02:00
|
|
|
= link_to event do
|
2014-12-28 16:54:58 +01:00
|
|
|
%strong.city{ title: event.address }= event.city
|
2014-06-27 00:52:47 +02:00
|
|
|
= event.title
|
|
|
|
|
2014-08-16 23:19:03 +02:00
|
|
|
.formats
|
|
|
|
%em.fa.fa-rss
|
2014-12-28 16:54:58 +01:00
|
|
|
= raw t '.calendar_in',
|
2014-10-31 14:33:39 +01:00
|
|
|
rss: link_to('RSS', events_path(:rss,
|
2014-08-16 23:19:03 +02:00
|
|
|
tag: params[:tag], region: params[:region])),
|
2015-10-22 21:14:36 +02:00
|
|
|
webcal: link_to('webcal', events_path(tag: params[:tag],
|
|
|
|
protocol: 'webcal', format: :ics, region: params[:region])),
|
2014-10-31 14:33:39 +01:00
|
|
|
ical: link_to('iCal', events_path(:rss,
|
2015-10-22 21:14:36 +02:00
|
|
|
tag: params[:tag], format: :ics, region: params[:region]))
|
2014-07-29 00:00:13 +02:00
|
|
|
|
2014-08-16 23:19:03 +02:00
|
|
|
%a#banner(href='http://april.org/campagne')
|
2014-12-28 16:54:58 +01:00
|
|
|
-# %img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april.png'
|
2014-08-16 23:19:03 +02:00
|
|
|
width='580' height='76' alt='Priorité au Logiciel Libre! Je soutiens l\'April.')
|
|
|
|
= image_tag 'priorite-logiciel-libre-je-soutiens-april_2_m.png',
|
|
|
|
width: '374', height: '48',
|
|
|
|
alt: 'Priorité au Logiciel Libre! Je soutiens l\'April.'
|
2014-08-09 18:59:11 +02:00
|
|
|
|
|
|
|
- set_events_meta
|