Organisation kinds counters and filters added to the organisations' page. Refs #52

This commit is contained in:
echarp 2016-01-10 16:18:20 +01:00
parent 8758427e3c
commit 09382cb3d2
3 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,5 @@
@import compass
.quantity
text-align: right
white-space: nowrap
@ -38,5 +40,16 @@ dl
dt + dd + dt +dd
border-top: 1px solid #999
ul.counters
text-align: center
li
display: inline
a:link, a:visited
color: white
display: inline-block
padding: 0.2em 0.8em
background-color: darkblue
+border-radius(1em)
.edit_link:link, .delete_link:link
display: none

View File

@ -0,0 +1,6 @@
%ul.counters
- Kind.all.each do |kind|
%li{ title: kind.name }
= link_to orgas_url(q: { kind_id_eq: kind.id }) do
%em.fa{ class: "fa-#{kind.icon}" }
= Orga.where(kind: kind).count

View File

@ -5,6 +5,8 @@
%em.fa.fa-users
= title t '.title'
= render 'types'
%table.list.autopagerize_page_element
%thead
%th.kind= sort_link @search, :kind_name, Orga.human_attribute_name(:kind)