Display avis counter on header

This commit is contained in:
Mathieu Magnin 2017-09-20 15:49:49 +02:00
parent 8dace5217a
commit a927affae6
3 changed files with 8 additions and 1 deletions

View file

@ -31,6 +31,7 @@
}
a {
display: inline-block;
padding: 23px $default-padding;
font-size: 18px;
color: $black;

View file

@ -14,7 +14,11 @@
= link_to "Procédures", procedures_path, class: (controller_name != 'avis') ? "active" : nil
- if current_gestionnaire.avis.count > 0
%li
= link_to "Avis", avis_index_path, class: (controller_name == 'avis') ? "active" : nil
= link_to avis_index_path, class: (controller_name == 'avis') ? "active" : nil do
Avis
- avis_counter = current_gestionnaire.avis.without_answer.count
- if avis_counter > 0
%span.badge.warning= avis_counter
%li
= link_to "Ancienne interface", backoffice_dossiers_path

View file

@ -8,6 +8,8 @@
= link_to(avis_index_path(statut: NewGestionnaire::AvisController::A_DONNER_STATUS)) do
avis à donner
%span.badge= @avis_a_donner.count
- if @avis_a_donner.any?
%span.notifications
%li{ class: (@statut == NewGestionnaire::AvisController::DONNES_STATUS) ? 'active' : nil }>
= link_to(avis_index_path(statut: NewGestionnaire::AvisController::DONNES_STATUS)) do