From 3dd25c1ea6a4775bc3967217591cd105154f7fd7 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Thu, 16 Nov 2023 18:07:26 +0100 Subject: [PATCH] fix(gestionnaires): apply navigation refactor to gestionnaires --- app/views/administrateurs/_main_navigation.html.haml | 2 +- .../{_main_menu.html.haml => _main_navigation.html.haml} | 4 ++-- app/views/gestionnaires/groupe_gestionnaires/index.html.haml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename app/views/gestionnaires/groupe_gestionnaires/{_main_menu.html.haml => _main_navigation.html.haml} (83%) diff --git a/app/views/administrateurs/_main_navigation.html.haml b/app/views/administrateurs/_main_navigation.html.haml index 1205bd8fe0c..33d8be45a46 100644 --- a/app/views/administrateurs/_main_navigation.html.haml +++ b/app/views/administrateurs/_main_navigation.html.haml @@ -1,6 +1,6 @@ %nav#header-navigation.fr-nav{ role: 'navigation', 'aria-label': 'Menu principal administrateur' } %ul.fr-nav__list - %li.fr-nav__item= link_to 'Mes démarches', admin_procedures_path, class:'fr-nav__link', 'aria-current': current_page?(controller: 'administrateurs/procedures', action: :index) ? 'true' : nil + %li.fr-nav__item= link_to 'Mes démarches', admin_procedures_path, class:'fr-nav__link', 'aria-current': current_page?(controller: 'administrateurs/procedures', action: :index) ? 'page' : nil - if Rails.application.config.ds_zonage_enabled %li.fr-nav__item= link_to 'Toutes les démarches', all_admin_procedures_path(zone_ids: current_administrateur.zones), class:'fr-nav__link', 'aria-current': current_page?(all_admin_procedures_path) ? 'page' : nil diff --git a/app/views/gestionnaires/groupe_gestionnaires/_main_menu.html.haml b/app/views/gestionnaires/groupe_gestionnaires/_main_navigation.html.haml similarity index 83% rename from app/views/gestionnaires/groupe_gestionnaires/_main_menu.html.haml rename to app/views/gestionnaires/groupe_gestionnaires/_main_navigation.html.haml index 938816c26dd..96649e9fb6a 100644 --- a/app/views/gestionnaires/groupe_gestionnaires/_main_menu.html.haml +++ b/app/views/gestionnaires/groupe_gestionnaires/_main_navigation.html.haml @@ -1,4 +1,4 @@ -.fr-container +- content_for(:main_navigation) do %nav#header-navigation.fr-nav{ role: 'navigation', 'aria-label': 'Menu principal gestionnaire' } %ul.fr-nav__list - %li.fr-nav__item= link_to 'Mes groupes gestionnaire', gestionnaire_groupe_gestionnaires_path, class:'fr-nav__link', 'aria-current': current_page?(controller: 'groupe_gestionnaires', action: :index) ? 'true' : nil + %li.fr-nav__item= link_to 'Mes groupes gestionnaire', gestionnaire_groupe_gestionnaires_path, class:'fr-nav__link', 'aria-current': current_page?(controller: 'groupe_gestionnaires', action: :index) ? 'page' : nil diff --git a/app/views/gestionnaires/groupe_gestionnaires/index.html.haml b/app/views/gestionnaires/groupe_gestionnaires/index.html.haml index d3550be0494..d425b320d05 100644 --- a/app/views/gestionnaires/groupe_gestionnaires/index.html.haml +++ b/app/views/gestionnaires/groupe_gestionnaires/index.html.haml @@ -1,4 +1,4 @@ -= render 'main_menu' += render 'main_navigation' .sub-header