Better counter/filtering. Refs #52
This commit is contained in:
parent
6846e7abde
commit
fd36bc7361
@ -1,17 +1,17 @@
|
||||
- p = params.keep_if { |k, _v| k == 'q' }
|
||||
- params[:q] = {} if params[:q].nil?
|
||||
- p = params[:q].clone
|
||||
|
||||
%ul.counters
|
||||
- Kind.all.each do |kind|
|
||||
- p[:q][:kind_id_eq] = kind.id
|
||||
- p[:kind_id_eq] = kind.id
|
||||
%li{ title: kind.name }
|
||||
= link_to orgas_url(p) do
|
||||
= link_to orgas_url(q: 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
|
||||
- p[:kind_id_eq] = params[:q][:kind_id_eq]
|
||||
- p[:active_eq] = true
|
||||
= link_to orgas_url(q: p) do
|
||||
%em.fa.fa-heartbeat
|
||||
= Orga.where(active: true).count
|
||||
|
Loading…
Reference in New Issue
Block a user