2014-08-06 14:47:47 +02:00
|
|
|
- set_events_meta
|
|
|
|
|
2014-07-29 00:00:13 +02:00
|
|
|
= render '/lugs/search' unless controller.controller_name == 'lugs'
|
|
|
|
|
|
|
|
-# Seems necessary, for the time being, to ensure calendar is changing days correctly
|
2014-08-01 00:40:26 +02:00
|
|
|
- Time.zone = 'Paris'
|
2014-07-07 13:49:31 +02:00
|
|
|
|
2013-12-29 00:23:08 +01:00
|
|
|
%form.region_selector
|
2014-06-27 00:52:47 +02:00
|
|
|
- if params[:start_date]
|
|
|
|
= hidden_field_tag :start_date, params[:start_date]
|
|
|
|
- if params[:year]
|
2013-12-29 16:47:57 +01:00
|
|
|
= hidden_field_tag :year, params[:year]
|
|
|
|
= label_tag :region, Region.model_name.human
|
2013-12-29 00:23:08 +01:00
|
|
|
= select_tag :region,
|
|
|
|
options_from_collection_for_select(Region.all, 'id', 'name', params[:region]),
|
2013-12-29 20:42:00 +01:00
|
|
|
prompt: t('.all_regions')
|
2013-12-29 00:23:08 +01:00
|
|
|
|
2014-06-27 00:52:47 +02:00
|
|
|
- if params[:year]
|
2013-12-29 17:45:53 +01:00
|
|
|
-# Whole year calendar
|
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-06-27 00:52:47 +02:00
|
|
|
= month_calendar events: @events,
|
2014-06-27 01:06:07 +02:00
|
|
|
title: ->(start_date) { raw link_to I18n.t('date.month_names')[start_date.month]+' '+params[:year], root_url( start_date: start_date), class: 'month_selector' },
|
|
|
|
previous_link: ->(param, date_range) { },
|
|
|
|
next_link: ->(param, date_range) { } do |date, events|
|
2014-06-27 00:52:47 +02:00
|
|
|
.day_number= date.day
|
2013-12-29 17:45:53 +01:00
|
|
|
%ul.events
|
2014-06-27 00:52:47 +02:00
|
|
|
- events.select { |e| e.start_time.to_date <= date and date <= e.end_time.to_date }.sort_by { |e| e.city }.each do |event|
|
|
|
|
%li.event
|
|
|
|
= link_to event do
|
2014-07-07 22:32:26 +02:00
|
|
|
%strong.city= event.city.gsub '-', ' '
|
2014-06-27 00:52:47 +02:00
|
|
|
= event.title
|
|
|
|
|
|
|
|
- else
|
|
|
|
= month_calendar events: @events,
|
2014-06-27 10:02:31 +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), class: 'year_selector'}" },
|
2014-07-01 15:50:39 +02:00
|
|
|
previous_link: ->(param, date_range) { link_to '<<', { param => date_range.first - 1.day, tag: params[:tag], region: params[:region] } },
|
|
|
|
next_link: ->(param, date_range) { link_to '>>', { param => date_range.last + 1.day, tag: params[:tag], region: params[:region] } } do |date, events|
|
2014-06-27 00:52:47 +02:00
|
|
|
.day_number= date.day
|
|
|
|
%ul.events
|
|
|
|
- events.select { |e| e.start_time.to_date <= date and date <= e.end_time.to_date }.sort_by { |e| e.city }.each do |event|
|
2013-12-29 17:45:53 +01:00
|
|
|
%li.event
|
2013-12-29 20:42:00 +01:00
|
|
|
= link_to event do
|
2014-07-07 22:32:26 +02:00
|
|
|
%strong.city= event.city.gsub '-', ' '
|
2013-12-29 17:45:53 +01:00
|
|
|
= event.title
|
|
|
|
|
2013-12-28 23:45:13 +01:00
|
|
|
.formats
|
2014-07-20 14:18:38 +02:00
|
|
|
%em.fa.fa-rss
|
2014-07-01 15:50:39 +02:00
|
|
|
=raw t '.calendar_in',
|
2014-07-20 14:18:38 +02:00
|
|
|
rss: link_to('RSS', events_url(:rss,
|
2014-07-01 15:50:39 +02:00
|
|
|
tag: params[:tag], region: params[:region])),
|
2014-07-20 14:18:38 +02:00
|
|
|
webcal: link_to('webcal', events_url(:rss,
|
|
|
|
tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])),
|
2014-07-01 15:50:39 +02:00
|
|
|
ical: link_to('iCal', events_url(:rss,
|
2014-07-18 17:02:33 +02:00
|
|
|
tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region]))
|
2014-07-29 00:00:13 +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.')
|
2014-08-01 01:38:33 +02:00
|
|
|
%img(src='http://www.april.org/campagne/images/priorite-logiciel-libre-je-soutiens-april_2_m.png'
|
2014-07-29 00:00:13 +02:00
|
|
|
width='374' height='48' alt='Priorité au Logiciel Libre! Je soutiens l\'April.')
|