Adapte les breadcrumbs sur l'interface instructeur

This commit is contained in:
Kara Diaby 2024-11-04 17:54:08 +00:00
parent 21f696a6e5
commit 29a2975752
No known key found for this signature in database
GPG key ID: C4D1B0CF9F24D759
12 changed files with 87 additions and 15 deletions

View file

@ -0,0 +1,45 @@
%nav.fr-breadcrumb.mt-0{ role: "navigation", aria: { label: t('you_are_here', scope: [:layouts, :breadcrumb]) } }
%button.fr-breadcrumb__button{ aria: { expanded: "false", controls: "breadcrumb-1" } }
= t('show', scope: [:layouts, :breadcrumb])
.fr-collapse#breadcrumb-1
%ol.fr-breadcrumb__list
%li= link_to t('root', scope: [:layouts, :breadcrumb]), root_path, class: 'fr-breadcrumb__link'
- steps.each.with_index do |step, i|
- if i == 0
%li= link_to "#{step[0]} - Suivi des dossiers", step[1], class: 'fr-breadcrumb__link'
- else
%li= link_to step[0], step[1], class: 'fr-breadcrumb__link'
- if defined?(metadatas)
.metadatas.pb-3
%h1.fr-h6.fr-mb-1w
= @procedure.libelle
- if @procedure.close?
.flex
%span.fr-badge.fr-badge--warning.fr-mr-1w
= t('closed', scope: [:layouts, :breadcrumb])
= t('since', scope: [:layouts, :breadcrumb], date: l(@procedure.closed_at.to_date))
- elsif @procedure.locked?
= link_to commencer_url(@procedure.path), commencer_url(@procedure.path), class: "fr-link"
.flex.fr-mt-1w
- if @procedure.api_entreprise_token_expired_or_expires_soon?
%span.fr-badge.fr-badge--error.fr-mr-1w
= t('to_modify', scope: [:layouts, :breadcrumb])
%span.fr-badge.fr-badge--success.fr-mr-1w
= t('published', scope: [:layouts, :breadcrumb])
= t('since', scope: [:layouts, :breadcrumb], number: @procedure.id, date: l(@procedure.published_at.to_date))
- else
%p.fr-mb-1w
= t('more_info_on_test', scope: [:layouts, :breadcrumb])
= link_to t('go_to_FAQ', scope: [:layouts, :breadcrumb]), t("url_FAQ", scope: [:layouts, :breadcrumb]), title: new_tab_suffix(t('go_to_FAQ', scope: [:layouts, :breadcrumb]))
.flex
%span.fr-badge.fr-badge--new.fr-mr-1w
= t('draft', scope: [:layouts, :breadcrumb])
= t('since', scope: [:layouts, :breadcrumb], number: @procedure.id, date: l(@procedure.created_at.to_date))

View file

@ -1,11 +1,12 @@
- content_for(:title, "Archives pour #{@procedure.libelle}")
-# = render partial: 'administrateurs/breadcrumbs',
-# locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
-# ['Archives']] }
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
[t('instructeurs.dossiers.header.banner.downloads')]] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }

View file

@ -1,7 +1,11 @@
- content_for(:title, "Notifications pour #{@procedure.libelle}")
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
['Gestion des instructeurs']] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }

View file

@ -1,7 +1,10 @@
- content_for(:title, "Administrateurs de #{@procedure.libelle}")
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), administrateurs_instructeur_procedure_path(@procedure)],[t('instructeurs.dossiers.header.banner.administrators_list')]] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }
.container

View file

@ -1,7 +1,11 @@
- content_for(:title, "#{@procedure.libelle}")
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
['Historique des dossiers supprimés']] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }

View file

@ -1,7 +1,10 @@
- content_for(:title, "Notifications pour #{@procedure.libelle}")
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
[t('instructeurs.dossiers.header.banner.notification_management')]] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }

View file

@ -1,7 +1,10 @@
- content_for(:title, "Contacter les usagers pour #{@procedure.libelle}")
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
[t('instructeurs.dossiers.header.banner.contact_users')]] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }

View file

@ -6,7 +6,11 @@
-# [t('.title')]] }
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
[t('instructeurs.dossiers.header.banner.exports_list')]] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }

View file

@ -2,8 +2,9 @@
#procedure-show
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)]] }
= render partial: 'header', locals: { procedure: @procedure, statut: @statut }
.procedure-actions

View file

@ -2,7 +2,11 @@
- content_for(:title, title)
.sub-header
.fr-container.flex
.fr-container.flex.column
= render partial: 'instructeurs/breadcrumbs',
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
[t('instructeurs.dossiers.header.banner.statistics')]] }
= render partial: 'instructeurs/procedures/header',
locals: { procedure: @procedure }

View file

@ -1,7 +1,7 @@
en:
layouts:
breadcrumb:
root: "Home"
root: "Home - List of procedures"
you_are_here: "You are here"
show: Show breadcrumb
preview: "Preview the form"

View file

@ -1,7 +1,7 @@
fr:
layouts:
breadcrumb:
root: "Accueil"
root: "Accueil - Liste des démarches"
you_are_here: "Vous êtes ici"
show: "Voir le fil dAriane"
preview: "Prévisualiser le formulaire"