From d1540c4a68365043ea93b2dcfa476f0a9c6d9565 Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Wed, 6 Sep 2017 11:13:59 +0200 Subject: [PATCH] Avis: add avis link in header --- app/views/layouts/_new_header.haml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml index 5fff9c479..e9a4f19ea 100644 --- a/app/views/layouts/_new_header.haml +++ b/app/views/layouts/_new_header.haml @@ -7,9 +7,14 @@ %img{ src: image_url("header/logo-tps.svg") } - if gestionnaire_signed_in? + - current_url = request.path_info %ul.header-tabs - %li - = link_to "Procédures", procedures_path, class: "active" + - if current_gestionnaire.procedures.count > 0 + %li + = 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 %li = link_to "Ancienne interface", backoffice_dossiers_path