%li{ class: params[:region] == filter_region.id.to_s ? 'selected' : '' } - if filter_region.url.present? = link_to filter_region.url do - if filter_region.code.present? = flag_icon filter_region.code.downcase = filter_region.name %small %em.fa.fa-external-link-alt - else = link_to start_date: params[:start_date], year: params[:year], region: params[:region] == filter_region.id.to_s ? '' : filter_region do - if filter_region.code.present? = flag_icon filter_region.code.downcase - else %em.fa.fa-shield-alt = filter_region.name - if params[:region] == filter_region.id.to_s %em.fa.fa-times - elsif !filter_region.region && filter_region.regions.present? %small %em.fa.fa-chevron-down - unless filter_region.region %ul = render partial: '/regions/filter_region', collection: filter_region.regions