agenda-libre-ruby/app/views/regions/_selector.haml

26 lines
646 B
Plaintext
Raw Normal View History

2014-08-16 16:04:42 +02:00
%nav.region_selector
-# Display the currently selected region
%h3
- if params[:region]
= Region.find params[:region]
%em.fa.fa-chevron-down
2014-08-16 16:04:42 +02:00
- else
%span.placeholder
=t '.all_regions'
%em.fa.fa-chevron-down
2014-08-16 16:04:42 +02:00
-# Choose a region to filter events with
%ul
%li
2014-08-16 16:04:42 +02:00
= link_to t('.all_regions'), region: nil,
start_date: params[:start_date],
year: params[:year],
tag: params[:tag]
2014-08-16 16:04:42 +02:00
- Region.all.each do |region|
%li
= link_to region, region: region.id,
start_date: params[:start_date],
year: params[:year],
tag: params[:tag]