From 4fc4e19ee6b4a49a866e3ae23c8a39b2a579276f Mon Sep 17 00:00:00 2001 From: kara Diaby Date: Fri, 26 Mar 2021 20:25:14 +0100 Subject: [PATCH] Ajoute l'onglet avis sur l'interface instructeur, qui renvoie vers le profil expert --- app/views/layouts/_header.haml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_header.haml b/app/views/layouts/_header.haml index c4e56e7a3..e787827d6 100644 --- a/app/views/layouts/_header.haml +++ b/app/views/layouts/_header.haml @@ -32,9 +32,21 @@ - if current_instructeur.procedures.count > 0 %li = active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link' + - if current_instructeur.user.expert && current_expert.avis.count > 0 + %li + = active_link_to expert_all_avis_path, active: controller_name == 'avis', class: 'tab-link' do + Avis + - avis_counter = current_expert.avis.without_answer.count + - if avis_counter > 0 + %span.badge.warning= avis_counter + - if nav_bar_profile == :expert && expert_signed_in? - - if current_expert.avis.count > 0 - %ul.header-tabs + %ul.header-tabs + - if current_expert.user.instructeur && current_instructeur.procedures.count > 0 + %li + = active_link_to "Démarches", instructeur_procedures_path, active: ['dossiers','procedures'].include?(controller_name), class: 'tab-link' + + - if current_expert.avis.count > 0 %li = active_link_to expert_all_avis_path, active: controller_name == 'avis', class: 'tab-link' do Avis