2020-04-05 17:13:37 +02:00
|
|
|
%h2.warning= t '.warning'
|
|
|
|
|
2019-06-16 17:08:56 +02:00
|
|
|
- unless params[:year] || params[:start_date] || params[:iframe]
|
|
|
|
= render '/maps/events'
|
|
|
|
|
2014-06-27 00:52:47 +02:00
|
|
|
- if params[:year]
|
|
|
|
%header.calendar-header.year
|
2018-10-17 17:47:41 +02:00
|
|
|
= link_to year: params[:year].to_i - 1 do
|
2016-10-19 14:31:00 +02:00
|
|
|
%em.fa.fa-backward
|
2013-12-29 17:45:53 +01:00
|
|
|
= params[:year]
|
2018-10-17 17:47:41 +02:00
|
|
|
= link_to year: params[:year].to_i + 1 do
|
2016-10-19 14:31:00 +02:00
|
|
|
%em.fa.fa-forward
|
2016-10-22 11:23:27 +02:00
|
|
|
:ruby
|
|
|
|
set_meta_tags(
|
|
|
|
prev: url_for(year: params[:year].to_i - 1),
|
|
|
|
next: url_for(year: params[:year].to_i + 1)
|
|
|
|
)
|
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
|
2016-03-01 22:54:52 +01:00
|
|
|
%ul.events.fa-ul= render month_events(@events, date)
|
2015-09-12 15:31:31 +02:00
|
|
|
|
|
|
|
- else
|
|
|
|
-# One month calendar
|
2016-10-22 11:23:27 +02:00
|
|
|
:ruby
|
2018-07-14 17:32:11 +02:00
|
|
|
params[:start_date] ||= Time.zone.today.beginning_of_month
|
2016-10-22 11:23:27 +02:00
|
|
|
set_meta_tags(
|
|
|
|
prev: url_for(start_date: params[:start_date].to_date - 1.month),
|
|
|
|
next: url_for(start_date: params[:start_date].to_date + 1.month)
|
|
|
|
)
|
2018-07-14 17:32:11 +02:00
|
|
|
@events = @events.month params[:start_date]
|
2016-10-22 11:23:27 +02:00
|
|
|
= month_calendar events: @events do |date, events|
|
2015-09-12 15:31:31 +02:00
|
|
|
- capture_haml do
|
2014-06-27 00:52:47 +02:00
|
|
|
.day_number= date.day
|
2019-04-29 18:29:38 +02:00
|
|
|
%ul.events.fa-ul= render events
|
2014-06-27 00:52:47 +02:00
|
|
|
|
2016-10-21 13:46:32 +02:00
|
|
|
.links
|
2019-10-22 22:52:05 +02:00
|
|
|
= t '.calendar_in_html',
|
2014-10-31 14:33:39 +01:00
|
|
|
rss: link_to('RSS', events_path(:rss,
|
2017-09-17 18:25:34 +02:00
|
|
|
tag: params[:tag], region: session[:region])),
|
2015-10-22 21:14:36 +02:00
|
|
|
webcal: link_to('webcal', events_path(tag: params[:tag],
|
2017-09-17 18:25:34 +02:00
|
|
|
protocol: 'webcal', format: :ics, region: session[:region])),
|
2014-10-31 14:33:39 +01:00
|
|
|
ical: link_to('iCal', events_path(:rss,
|
2017-09-17 18:25:34 +02:00
|
|
|
tag: params[:tag], format: :ics, region: session[:region]))
|
2014-07-29 00:00:13 +02:00
|
|
|
|
2020-04-03 16:28:14 +02:00
|
|
|
%a#banner(href='https://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.'
|
2018-12-20 12:29:31 +01:00
|
|
|
|
2020-04-03 16:28:14 +02:00
|
|
|
/ %a#banner(href='https://www.libre-en-fete.net')
|
|
|
|
/ = image_tag 'lef.png', width: '486', height: '80', alt: 'Libre en Fete'
|
2014-08-09 18:59:11 +02:00
|
|
|
|
2019-06-25 22:39:57 +02:00
|
|
|
- events_meta
|