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

22 lines
592 B
Plaintext

:ruby
selected = params[:region].to_i == region.id
regions = Region.where(region: region)
%li{ class: selected ? 'selected' : '' }
- if region.url.present?
= link_to region.url do
= image_tag "regions/#{region.code}.png" if region.code.present?
= region.name
- if regions.present?
%em.fa.fa-chevron-down
- else
= link_to region: region.id,
start_date: params[:start_date],
year: params[:year],
tag: params[:tag] do
%em.fa.fa-shield
= region.name
%ul
= render partial: '/regions/region',
collection: regions