Merge pull request #830 from sgmap/procedure-links

[Fix #802] Make the procedure’s stats clickable
This commit is contained in:
gregoirenovel 2017-10-12 07:19:51 +02:00 committed by GitHub
commit 8e6aa82095
2 changed files with 41 additions and 27 deletions

View file

@ -49,6 +49,10 @@
width: 90px; width: 90px;
position: relative; position: relative;
&:hover {
background-color: rgba(0, 0, 0, 0.05);
}
&:last-child { &:last-child {
border-right: 1px solid $border-grey; border-right: 1px solid $border-grey;
} }

View file

@ -17,37 +17,47 @@
%ul.procedure-stats.flex %ul.procedure-stats.flex
%li %li
- a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0 %object
.stats-number = link_to(procedure_path(p, statut: 'a-suivre')) do
= a_suivre_count - a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0
.stats-legend .stats-number
à suivre = a_suivre_count
.stats-legend
à suivre
%li %li
- if @notifications_count_per_procedure[p.id].present? %object
%span.notifications{ 'aria-label': "notifications" } = link_to(procedure_path(p, statut: 'suivis')) do
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0 - if @notifications_count_per_procedure[p.id].present?
.stats-number %span.notifications{ 'aria-label': "notifications" }
= followed_count - followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
.stats-legend .stats-number
= t('pluralize.followed', count: followed_count) = followed_count
.stats-legend
= t('pluralize.followed', count: followed_count)
%li %li
- termines_count = @dossiers_termines_count_per_procedure[p.id] || 0 %object
.stats-number = link_to(procedure_path(p, statut: 'traites')) do
= termines_count - termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
.stats-legend .stats-number
= t('pluralize.processed', count: termines_count) = termines_count
.stats-legend
= t('pluralize.processed', count: termines_count)
%li %li
- dossier_count = @dossiers_count_per_procedure[p.id] || 0 %object
.stats-number = link_to(procedure_path(p, statut: 'tous')) do
= dossier_count - dossier_count = @dossiers_count_per_procedure[p.id] || 0
.stats-legend .stats-number
= t('pluralize.case', count: dossier_count) = dossier_count
.stats-legend
= t('pluralize.case', count: dossier_count)
%li %li
- archived_count = @dossiers_archived_count_per_procedure[p.id] || 0 %object
.stats-number = link_to(procedure_path(p, statut: 'archives')) do
= archived_count - archived_count = @dossiers_archived_count_per_procedure[p.id] || 0
.stats-legend .stats-number
= t('pluralize.archived', count: archived_count) = archived_count
.stats-legend
= t('pluralize.archived', count: archived_count)
- if p.archivee? - if p.archivee?
.procedure-status .procedure-status