demarches-normaliennes/app/views/new_gestionnaire/procedures/index.html.haml
gregoirenovel ab625093d7 [Fix #802] Make the procedure’s stats clickable
They redirect directly to the right tabs

See http://kizu.ru/en/fun/nested-links/
for the dirty trick
2017-10-11 17:55:57 +02:00

64 lines
2.6 KiB
Text

.container
%h1.backoffice-title Procédures
%ul.procedure-list
- @procedures.each do |p|
%li.procedure-item.flex.align-start
= link_to(procedure_path(p)) do
.flex
.procedure-logo
- if p.logo.present?
= image_tag p.logo, alt: "Logo de la procédure"
.procedure-details
%p.procedure-title
= p.libelle
%ul.procedure-stats.flex
%li
%object
= link_to(procedure_path(p, statut: 'a-suivre')) do
- a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0
.stats-number
= a_suivre_count
.stats-legend
à suivre
%li
%object
= link_to(procedure_path(p, statut: 'suivis')) do
- if @notifications_count_per_procedure[p.id].present?
%span.notifications{ 'aria-label': "notifications" }
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
.stats-number
= followed_count
.stats-legend
= t('pluralize.followed', count: followed_count)
%li
%object
= link_to(procedure_path(p, statut: 'traites')) do
- termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
.stats-number
= termines_count
.stats-legend
= t('pluralize.processed', count: termines_count)
%li
%object
= link_to(procedure_path(p, statut: 'tous')) do
- dossier_count = @dossiers_count_per_procedure[p.id] || 0
.stats-number
= dossier_count
.stats-legend
= t('pluralize.case', count: dossier_count)
%li
%object
= link_to(procedure_path(p, statut: 'archives')) do
- archived_count = @dossiers_archived_count_per_procedure[p.id] || 0
.stats-number
= archived_count
.stats-legend
= t('pluralize.archived', count: archived_count)
- if p.archivee?
.procedure-status
%span.label Archivée