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

26 lines
681 B
Plaintext

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