add main menu for admin procedures views

This commit is contained in:
Christophe Robillard 2022-10-25 17:06:27 +02:00
parent 22fe357d75
commit 3f0279ac45
3 changed files with 10 additions and 2 deletions

View file

@ -0,0 +1,5 @@
.fr-container
%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

View file

@ -1,3 +1,4 @@
= render 'main_menu'
.fr-container .fr-container
%h1.fr-my-4w Toutes les démarches %h1.fr-my-4w Toutes les démarches

View file

@ -1,7 +1,9 @@
= render 'main_menu'
.sub-header .sub-header
.procedure-admin-listing-container .procedure-admin-listing-container
= link_to "Nouvelle Démarche", new_from_existing_admin_procedures_path, id: 'new-procedure', class: 'fr-btn' = link_to "Nouvelle Démarche", new_from_existing_admin_procedures_path, id: 'new-procedure', class: 'fr-btn'
.container .fr-container
%nav.tabs %nav.tabs
%ul %ul
@ -10,7 +12,7 @@
= tab_item(t('pluralize.closed', count: @procedures_closed.count), admin_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closed_count)) = tab_item(t('pluralize.closed', count: @procedures_closed.count), admin_procedures_path(statut: 'archivees'), active: @statut == 'archivees', badge: number_with_html_delimiter(@procedures_closed_count))
= tab_item(t('pluralize.deleted', count: @procedures_deleted.count), admin_procedures_path(statut: 'supprimees'), active: @statut === 'supprimees', badge: number_with_html_delimiter(@procedures_deleted_count)) = tab_item(t('pluralize.deleted', count: @procedures_deleted.count), admin_procedures_path(statut: 'supprimees'), active: @statut === 'supprimees', badge: number_with_html_delimiter(@procedures_deleted_count))
.container#procedures{ data: { item_count: @statut === "publiees" ? @procedures_publiees_count : @statut === "brouillons" ? @procedures_draft_count : @procedures_closed_count } } .fr-container#procedures{ data: { item_count: @statut === "publiees" ? @procedures_publiees_count : @statut === "brouillons" ? @procedures_draft_count : @procedures_closed_count } }
- if @statut === "publiees" - if @statut === "publiees"
= render partial: "procedures_list", locals: { procedures: @procedures_publiees } = render partial: "procedures_list", locals: { procedures: @procedures_publiees }
= paginate @procedures_publiees = paginate @procedures_publiees