2014-08-16 23:35:22 +02:00
|
|
|
= render '/lugs/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-07-01 15:50:39 +02: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-07-01 15:50:39 +02: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
|
|
|
|
2014-09-05 22:15:38 +02:00
|
|
|
= month_calendar day_names: 'date.day_names', events: @events,
|
2014-08-09 18:59:11 +02:00
|
|
|
previous_link: nil, next_link: nil,
|
|
|
|
title: ->(start_date) { raw link_to l(start_date, format: :month),
|
|
|
|
root_url(start_date: start_date), class: 'month_selector' } do |date, events|
|
2014-06-27 00:52:47 +02:00
|
|
|
.day_number= date.day
|
2014-09-28 12:53:17 +02:00
|
|
|
%ul.events.fa-ul
|
2014-08-31 16:43:15 +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-09-28 12:53:17 +02:00
|
|
|
%li.event(title="#{display_date(event)}")
|
|
|
|
- if event.locality?
|
|
|
|
%em.locality.fa.fa-li.fa-globe
|
2014-06-27 00:52:47 +02:00
|
|
|
= link_to event do
|
2014-09-28 12:53:17 +02:00
|
|
|
%strong.city(title="#{event.address}")= event.city
|
2014-06-27 00:52:47 +02:00
|
|
|
= event.title
|
|
|
|
|
|
|
|
- else
|
2014-08-09 18:59:11 +02:00
|
|
|
-# One month calendar
|
|
|
|
- @events = @events.month params[:start_date].try :to_date
|
2014-09-05 22:15:38 +02:00
|
|
|
= month_calendar day_names: 'date.day_names', events: @events,
|
2014-08-09 18:59:11 +02:00
|
|
|
title: ->(start_date) { raw "#{I18n.t('date.month_names')[start_date.month]} #{link_to start_date.year,
|
|
|
|
root_url(year: start_date.year)}" },
|
|
|
|
previous_link: ->(param, date_range) { link_to '<<',
|
|
|
|
{ param => (date_range.first - 1.day).beginning_of_month, tag: params[:tag], region: params[:region] } },
|
|
|
|
next_link: ->(param, date_range) { link_to '>>',
|
|
|
|
{ param => (date_range.last + 1.day).beginning_of_month, tag: params[:tag], region: params[:region] } } do |date, events|
|
2014-06-27 00:52:47 +02:00
|
|
|
.day_number= date.day
|
2014-09-27 13:06:11 +02:00
|
|
|
%ul.events.fa-ul
|
2014-08-31 16:43:15 +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-09-28 12:53:17 +02:00
|
|
|
%li.event(title="#{display_date(event)}")
|
2014-09-27 13:06:11 +02:00
|
|
|
- if event.locality?
|
2014-09-28 12:53:17 +02:00
|
|
|
%em.locality.fa.fa-li.fa-globe
|
2013-12-29 20:42:00 +01:00
|
|
|
= link_to event do
|
2014-09-28 12:53:17 +02:00
|
|
|
%strong.city(title="#{event.address}")= event.city
|
2013-12-29 17:45:53 +01:00
|
|
|
= event.title
|
|
|
|
|
2014-08-16 23:19:03 +02:00
|
|
|
.formats
|
|
|
|
%em.fa.fa-rss
|
|
|
|
=raw t '.calendar_in',
|
|
|
|
rss: link_to('RSS', events_url(:rss,
|
|
|
|
tag: params[:tag], region: params[:region])),
|
|
|
|
webcal: link_to('webcal', events_url(:rss,
|
|
|
|
tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])),
|
|
|
|
ical: link_to('iCal', events_url(:rss,
|
|
|
|
tag: params[:tag], format: :ics, tag: params[:tag], 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')
|
|
|
|
-#%img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april.png'
|
|
|
|
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
|