2014-08-16 16:04:42 +02:00
|
|
|
%nav.region_selector
|
|
|
|
-# Display the currently selected region
|
|
|
|
%h3
|
2014-08-18 00:43:59 +02:00
|
|
|
- if params[:region] && params[:region] != 'all'
|
2014-09-28 00:46:35 +02:00
|
|
|
%em.locality.fa.fa-shield
|
2014-08-16 16:04:42 +02:00
|
|
|
= Region.find params[:region]
|
2014-08-16 11:19:27 +02:00
|
|
|
%em.fa.fa-chevron-down
|
2014-10-14 10:33:22 +02:00
|
|
|
- elsif params[:locality]
|
|
|
|
%span.placeholder
|
|
|
|
%em.locality.fa.fa-globe
|
2015-12-27 16:12:27 +01:00
|
|
|
= t '.national'
|
2014-10-14 10:33:22 +02:00
|
|
|
%em.fa.fa-chevron-down
|
2014-08-16 16:04:42 +02:00
|
|
|
- else
|
|
|
|
%span.placeholder
|
2014-09-28 00:46:35 +02:00
|
|
|
%em.locality.fa.fa-globe
|
2015-12-27 16:12:27 +01:00
|
|
|
= t '.all_regions'
|
2014-08-16 16:04:42 +02:00
|
|
|
%em.fa.fa-chevron-down
|
2014-08-16 11:19:27 +02:00
|
|
|
|
2014-08-16 16:04:42 +02:00
|
|
|
-# Choose a region to filter events with
|
|
|
|
%ul
|
2014-08-16 11:19:27 +02:00
|
|
|
%li
|
2014-08-16 16:04:42 +02:00
|
|
|
= link_to t('.all_regions'), region: nil,
|
2014-08-16 11:19:27 +02:00
|
|
|
start_date: params[:start_date],
|
|
|
|
year: params[:year],
|
|
|
|
tag: params[:tag]
|
2014-08-16 16:04:42 +02:00
|
|
|
|
2014-08-25 17:55:14 +02:00
|
|
|
- Region.pluck(:id, :name).each do |id, name|
|
2014-08-16 16:04:42 +02:00
|
|
|
%li
|
2014-08-25 17:55:14 +02:00
|
|
|
= link_to name, region: id,
|
2014-08-16 16:04:42 +02:00
|
|
|
start_date: params[:start_date],
|
|
|
|
year: params[:year],
|
|
|
|
tag: params[:tag]
|
2014-10-14 10:33:22 +02:00
|
|
|
|
2015-12-27 16:12:27 +01:00
|
|
|
- unless controller.class == OrgasController
|
|
|
|
%li
|
|
|
|
= link_to locality: 1,
|
|
|
|
start_date: params[:start_date],
|
|
|
|
year: params[:year],
|
|
|
|
tag: params[:tag] do
|
|
|
|
%em.fa.fa-globe
|
|
|
|
= t '.national'
|