45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
%form.region_selector
|
|
- if (params[:month])
|
|
= hidden_field_tag :month, params[:month]
|
|
- if (params[:year])
|
|
= hidden_field_tag :year, params[:year]
|
|
= label_tag :region, Region.model_name.human
|
|
= select_tag :region,
|
|
options_from_collection_for_select(Region.all, 'id', 'name', params[:region]),
|
|
prompt: t('.all_regions')
|
|
|
|
- if (params[:year] and !params[:month])
|
|
-# Whole year calendar
|
|
%h2
|
|
- params[:year] ||= Date.today.year
|
|
= link_to '<<', "?year=#{params[:year].to_i-1}"
|
|
= params[:year]
|
|
= link_to '>>', "?year=#{params[:year].to_i+1}"
|
|
|
|
- (1..12).each do |i|
|
|
- params[:month] = i
|
|
|
|
= calendar @events, { prev_text: '', next_text: '', start_day: :monday,
|
|
params: { region: params[:region], tag: params[:tag] } } do |event|
|
|
%ul.events
|
|
%li.event
|
|
= link_to event do
|
|
%strong= event.city
|
|
= event.title
|
|
|
|
- else
|
|
= calendar @events, { prev_text: '<<', next_text: '>>', start_day: :monday,
|
|
params: { region: params[:region], tag: params[:tag] } } do |event|
|
|
%ul.events
|
|
%li.event
|
|
= link_to event do
|
|
%strong= event.city
|
|
= event.title
|
|
|
|
.formats
|
|
=t '.calendar_in'
|
|
= link_to('rss', events_url(:rss))+','
|
|
= link_to 'iCal', events_url(:rss)
|
|
ou
|
|
= link_to 'calendrier Google', events_url(:rss)
|