From 26a2ce254a6860c7483e5bb0dfb40ae0573b529c Mon Sep 17 00:00:00 2001 From: echarp Date: Sat, 17 Feb 2018 16:46:53 +0100 Subject: [PATCH] The active filtering button has a title, and is slightly separated from others Closes #114 --- app/views/orgas/_types.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/orgas/_types.haml b/app/views/orgas/_types.haml index a5de50ed..b90ed9ed 100644 --- a/app/views/orgas/_types.haml +++ b/app/views/orgas/_types.haml @@ -3,16 +3,17 @@ %ul.counters -# The reorder and specific count are required for the "near" scope - - @unfiltered_orgas.reorder('').group(:kind).count(:id).each do |kind, count| + - @unfiltered_orgas.reorder('').group(:kind).count.each do |kind, count| - p[:kind_id_eq] = kind.id %li{ title: Kind.human_attribute_name("name_#{kind.name}") } = link_to orgas_url(q: p) do %em.fa{ class: "fa-#{kind.icon}" } = count - %li + %li{ title: Kind.human_attribute_name('active').pluralize } - p[:kind_id_eq] = params[:q][:kind_id_eq] - p[:active_eq] = true + | = link_to orgas_url(q: p) do %em.fa.fa-heartbeat - = @unfiltered_orgas.active.count :id + = @unfiltered_orgas.active.count