display all demarches only if zonage enabled

This commit is contained in:
Christophe Robillard 2022-12-20 09:44:58 +01:00
parent 11a18516b2
commit cfc2aec334
2 changed files with 4 additions and 3 deletions

View file

@ -2,4 +2,5 @@
%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?(admin_procedures_path) ? 'page' : nil
%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
- 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

View file

@ -450,8 +450,8 @@ Rails.application.routes.draw do
collection do
get 'new_from_existing'
post 'search'
get 'all'
get 'administrateurs'
get 'all' if Rails.application.config.ds_zonage_enabled
get 'administrateurs' if Rails.application.config.ds_zonage_enabled
end
member do