A calendar management project, for events and activities related to communities fighting for freedoms.
This can be related to software, art, data, hardware, content, commons, internet.
https://www.agendadulibre.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

44 lines
1.3 KiB

%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.gsub('-', ' ')
= 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.gsub('-', ' ')
= 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)