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

25 lines
581 B
Plaintext

-# Display the currently selected region
%h3
- if params[:region]
= 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.all.each do |region|
%li
= link_to region, region: region.id,
start_date: params[:start_date],
year: params[:year],
tag: params[:tag]