Filtering active organisations. Refs #52
This commit is contained in:
parent
09382cb3d2
commit
6846e7abde
@ -1,6 +1,17 @@
|
||||
- p = params.keep_if { |k, _v| k == 'q' }
|
||||
- params[:q] = {} if params[:q].nil?
|
||||
|
||||
%ul.counters
|
||||
- Kind.all.each do |kind|
|
||||
- p[:q][:kind_id_eq] = kind.id
|
||||
%li{ title: kind.name }
|
||||
= link_to orgas_url(q: { kind_id_eq: kind.id }) do
|
||||
= link_to orgas_url(p) do
|
||||
%em.fa{ class: "fa-#{kind.icon}" }
|
||||
= Orga.where(kind: kind).count
|
||||
|
||||
%li
|
||||
- p[:q][:kind_id_eq] = nil
|
||||
- p[:q][:active_eq] = true
|
||||
= link_to orgas_url(p) do
|
||||
%em.fa.fa-heartbeat
|
||||
= Orga.where(active: true).count
|
||||
|
Loading…
Reference in New Issue
Block a user