diff --git a/app/assets/stylesheets/list.sass b/app/assets/stylesheets/list.sass index 5ad741e5..39dc2210 100644 --- a/app/assets/stylesheets/list.sass +++ b/app/assets/stylesheets/list.sass @@ -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 diff --git a/app/views/orgas/_types.haml b/app/views/orgas/_types.haml new file mode 100644 index 00000000..10d6cd2a --- /dev/null +++ b/app/views/orgas/_types.haml @@ -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 diff --git a/app/views/orgas/index.html.haml b/app/views/orgas/index.html.haml index d8fddc43..82cf1d78 100644 --- a/app/views/orgas/index.html.haml +++ b/app/views/orgas/index.html.haml @@ -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)