From 4476f00be23e7304c260d3202a952b16b740d519 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Mon, 20 Jul 2020 11:26:19 +0200 Subject: [PATCH] fix active link menu for demarches --- app/views/layouts/_new_header.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml index c97277397..28c78bfc9 100644 --- a/app/views/layouts/_new_header.haml +++ b/app/views/layouts/_new_header.haml @@ -29,10 +29,10 @@ %ul.header-tabs - if current_instructeur.procedures.count > 0 %li - = active_link_to "Démarches", instructeur_procedures_path, active: /^((?!avis).)*$/, class: 'tab-link' + = active_link_to "Démarches", instructeur_procedures_path, active: controller_name == 'dossiers', class: 'tab-link' - if current_instructeur.avis.count > 0 %li - = active_link_to instructeur_all_avis_path, active: /avis/, class: 'tab-link' do + = active_link_to instructeur_all_avis_path, active: controller_name == 'avis', class: 'tab-link' do Avis - avis_counter = current_instructeur.avis.without_answer.count - if avis_counter > 0