2016-01-10 17:15:56 +01:00
|
|
|
- params[:q] = {} if params[:q].nil?
|
2017-11-11 12:44:09 +01:00
|
|
|
- p = params[:q].clone.permit
|
2016-01-10 17:15:56 +01:00
|
|
|
|
2016-01-10 16:18:20 +01:00
|
|
|
%ul.counters
|
2017-09-17 23:43:04 +02:00
|
|
|
-# The reorder and specific count are required for the "near" scope
|
2018-10-17 15:47:43 +02:00
|
|
|
- @unfiltered_orgas.reorder('').group(:kind).count(:all).each do |kind, count|
|
2016-01-10 17:28:47 +01:00
|
|
|
- p[:kind_id_eq] = kind.id
|
2016-02-26 23:25:22 +01:00
|
|
|
%li{ title: Kind.human_attribute_name("name_#{kind.name}") }
|
2019-04-24 19:53:49 +02:00
|
|
|
= link_to orgas_url(q: p, active: params[:active]) do
|
2016-01-10 16:18:20 +01:00
|
|
|
%em.fa{ class: "fa-#{kind.icon}" }
|
2017-09-17 23:43:04 +02:00
|
|
|
= count
|
2016-01-10 17:15:56 +01:00
|
|
|
|
2019-04-24 19:53:49 +02:00
|
|
|
%li{ title: Kind.human_attribute_name('active').pluralize + '?' }
|
2016-01-10 17:28:47 +01:00
|
|
|
- p[:kind_id_eq] = params[:q][:kind_id_eq]
|
2019-04-24 19:53:49 +02:00
|
|
|
\/
|
|
|
|
= link_to orgas_url(q: p, active: params[:active].present? && params[:active] != 'true') do
|
|
|
|
- if params[:active].nil? || params[:active] == 'true'
|
|
|
|
%em.fa.fa-heartbeat
|
|
|
|
- else
|
|
|
|
%em.fa.fa-heart-broken
|
|
|
|
= @unfiltered_orgas.count
|