Merge pull request #11004 from demarches-simplifiees/feat/10932_instructor_navigation
ETQ instructeur, je navigue facilement entre les différentes rubriques d'une démarche
This commit is contained in:
commit
c1d8a738d2
26 changed files with 278 additions and 92 deletions
|
@ -1,6 +1,6 @@
|
|||
|
||||
.fr-container
|
||||
%h1.fr-h2
|
||||
%h1.fr-h4
|
||||
Historique des dossiers supprimés
|
||||
|
||||
.fr-container
|
||||
|
|
33
app/helpers/navigation_helper.rb
Normal file
33
app/helpers/navigation_helper.rb
Normal file
|
@ -0,0 +1,33 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module NavigationHelper
|
||||
def current_nav_section
|
||||
if procedure_management_section?
|
||||
'procedure_management'
|
||||
elsif user_support_section?
|
||||
'user_support'
|
||||
elsif downloads_section?
|
||||
'downloads'
|
||||
else
|
||||
'follow_up'
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def procedure_management_section?
|
||||
return true if params[:action].in?(['administrateurs', 'stats', 'email_notifications', 'deleted_dossiers'])
|
||||
return true if params[:controller] == 'instructeurs/groupe_instructeurs'
|
||||
|
||||
false
|
||||
end
|
||||
|
||||
def user_support_section?
|
||||
params[:action] == 'email_usagers' || params[:action] == 'apercu'
|
||||
end
|
||||
|
||||
def downloads_section?
|
||||
params[:action] == 'exports' ||
|
||||
params[:controller] == 'instructeurs/archives'
|
||||
end
|
||||
end
|
13
app/views/instructeurs/_breadcrumbs.html.haml
Normal file
13
app/views/instructeurs/_breadcrumbs.html.haml
Normal file
|
@ -0,0 +1,13 @@
|
|||
%nav.fr-mb-0.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 == steps.size - 1
|
||||
%li= link_to step[0], '', { aria: { current: "page" } , class: 'fr-breadcrumb__link' }
|
||||
- else
|
||||
%li= link_to "#{step[0]} - Suivi des dossiers", step[1], class: 'fr-breadcrumb__link'
|
|
@ -1,11 +1,17 @@
|
|||
- 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.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 }
|
||||
|
||||
.container
|
||||
%h1.mb-2 Archives
|
||||
%h1.mb-2.fr-h4 Téléchargement mensuel
|
||||
|
||||
= render partial: "shared/archives/notice"
|
||||
= render partial: "shared/archives/table", locals: {count_dossiers_termines_by_month: @count_dossiers_termines_by_month, archives: @archives, average_dossier_weight: @average_dossier_weight, procedure: @procedure }
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
- content_for(:title, "Notifications pour #{@procedure.libelle}")
|
||||
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
||||
['Groupes d’instructeurs']] }
|
||||
.sub-header
|
||||
.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 }
|
||||
|
||||
.fr-container.groupe-instructeur
|
||||
%h1 Gestion des Groupes
|
||||
%h1.fr-h4 Gestion des instructeurs
|
||||
.card
|
||||
%h2.fr-h3 Liste des groupes
|
||||
%table.table.mt-2
|
||||
|
|
|
@ -1,36 +1,61 @@
|
|||
.procedure-header
|
||||
.flex.clipboard-container
|
||||
%h1.fr-h3
|
||||
= "#{procedure_libelle procedure} - n°#{procedure.id}"
|
||||
= render Dsfr::CopyButtonComponent.new(title: t('instructeurs.procedures.index.copy_link_button'), text: commencer_url(procedure.path))
|
||||
= link_to t('instructeurs.dossiers.header.banner.notification_management'), email_notifications_instructeur_procedure_path(procedure), class: 'header-link'
|
||||
|
|
||||
= link_to t('instructeurs.dossiers.header.banner.statistics'), stats_instructeur_procedure_path(procedure), class: 'header-link'
|
||||
.clipboard-container
|
||||
%h1.fr-h3.fr-mb-0
|
||||
= "#{procedure_libelle procedure} (n°#{procedure.id})"
|
||||
%nav.fr-nav#navigation{ role: "navigation", "aria-label": t('instructeurs.dossiers.header.banner.procedure_navigation') }
|
||||
%ul.fr-nav__list
|
||||
%li.fr-nav__item
|
||||
= link_to t('instructeurs.dossiers.header.banner.follow_up'), instructeur_procedure_path(procedure), target: "_self", "aria-current": ('page' if current_nav_section == 'follow_up'), class: "fr-nav__link"
|
||||
|
||||
- if current_administrateur&.owns?(procedure)
|
||||
|
|
||||
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), admin_procedure_groupe_instructeurs_path(procedure), class: 'header-link'
|
||||
- elsif procedure.instructeurs_self_management? && procedure.routing_enabled?
|
||||
|
|
||||
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupes_path(procedure), class: 'header-link'
|
||||
- elsif procedure.instructeurs_self_management?
|
||||
|
|
||||
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupe_path(procedure, procedure.defaut_groupe_instructeur), class: 'header-link'
|
||||
%li.fr-nav__item.relative
|
||||
%button.fr-nav__btn{ 'aria-expanded': 'false', 'aria-controls': "menu-procedure", 'aria-current': ('page' if current_nav_section == 'procedure_management') }
|
||||
= t('instructeurs.dossiers.header.banner.procedure_management')
|
||||
#menu-procedure.fr-collapse.fr-menu
|
||||
%ul.fr-menu__list
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.administrators_list'), administrateurs_instructeur_procedure_path(procedure), class: 'fr-nav__link'
|
||||
|
||||
- if can_send_groupe_message?(procedure)
|
||||
|
|
||||
= link_to t('instructeurs.dossiers.header.banner.contact_users'), email_usagers_instructeur_procedure_path(procedure), class: 'header-link'
|
||||
- if procedure.instructeurs_self_management_enabled?
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupes_path(procedure), class: 'fr-nav__link'
|
||||
|
||||
- elsif procedure.administrateurs.exists?(id: current_administrateur&.id)
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), admin_procedure_groupe_instructeurs_path(procedure), class:
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.notification_management'), email_notifications_instructeur_procedure_path(procedure), class: 'fr-nav__link'
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.statistics'), stats_instructeur_procedure_path(procedure), class: 'fr-nav__link'
|
||||
%li
|
||||
= link_to t('views.instructeurs.dossiers.show_deleted_dossiers'), deleted_dossiers_instructeur_procedure_path(@procedure), class: 'fr-nav__link'
|
||||
|
||||
%li.fr-nav__item.relative
|
||||
%button.fr-nav__btn{ 'aria-expanded': 'false', 'aria-controls': 'menu-support', 'aria-current': ('page' if current_nav_section == 'user_support') }
|
||||
= t('instructeurs.dossiers.header.banner.user_support')
|
||||
#menu-support.fr-collapse.fr-menu
|
||||
%ul.fr-menu__list
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.contact_users'), email_usagers_instructeur_procedure_path(procedure), class: 'fr-nav__link'
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.preview'), apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'fr-nav__link'
|
||||
%li
|
||||
= link_to "#", class: "fr-nav__link fr-link fr-link--md fr-link--icon-left fr-icon-clipboard-line", data: {controller: "clipboard", clipboard_text_value: commencer_url(@procedure.path), action: "click->clipboard#copy" } do
|
||||
= t('instructeurs.dossiers.header.banner.copy_link_button')
|
||||
|
||||
%li.fr-nav__item.relative
|
||||
%button.fr-nav__btn{ 'aria-expanded': 'false', 'aria-controls': 'menu-downloads', 'aria-current': ('page' if current_nav_section == 'downloads') }
|
||||
= t('instructeurs.dossiers.header.banner.downloads')
|
||||
#menu-downloads.fr-collapse.fr-menu
|
||||
%ul.fr-menu__list
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.exports_list'), exports_instructeur_procedure_path(procedure), class: 'fr-nav__link'
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.archives'), instructeur_archives_path(procedure), class: 'fr-nav__link'
|
||||
%li
|
||||
= link_to t('instructeurs.dossiers.header.banner.exports_models'), exports_instructeur_procedure_path(procedure), class: 'fr-nav__link'
|
||||
|
||||
|
|
||||
= link_to t('instructeurs.dossiers.header.banner.administrators_list'), administrateurs_instructeur_procedure_path(procedure), class: 'header-link'
|
||||
|
|
||||
= link_to t('views.instructeurs.dossiers.show_deleted_dossiers'), deleted_dossiers_instructeur_procedure_path(@procedure), class: "header-link"
|
||||
|
|
||||
= link_to t('instructeurs.dossiers.header.banner.exports_list'), exports_instructeur_procedure_path(procedure), class: 'header-link'
|
||||
- if @has_export_notification
|
||||
%span.notifications{ 'aria-label': t('instructeurs.dossiers.header.banner.exports_notification_label') }
|
||||
|
||||
|
||||
|
||||
#last-export-alert
|
||||
= render partial: "last_export_alert", locals: { export: @last_export, statut: @statut }
|
||||
= render partial: "instructeurs/procedures/last_export_alert", locals: { export: @last_export, statut: @statut }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
%nav.fr-tabs.mt-3
|
||||
%ul.fr-tabs__list{ role: 'tablist' }
|
||||
%ul.fr-tabs__list.fr-pl-0{ role: 'tablist' }
|
||||
= tab_item(t(tab_i18n_key_from_status('a-suivre')),
|
||||
instructeur_procedure_path(procedure, statut: 'a-suivre'),
|
||||
active: statut == 'a-suivre',
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
- content_for(:title, "Administrateurs de #{@procedure.libelle}")
|
||||
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [[@procedure.libelle.truncate_words(10), administrateurs_instructeur_procedure_path(@procedure)],['Administrateurs']] }
|
||||
.sub-header
|
||||
.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
|
||||
%h1
|
||||
%h1.fr-h4
|
||||
= t('instructeurs.procedures.administrators_list.title', procedure_id: @procedure.id, procedure_libelle: @procedure.libelle)
|
||||
|
||||
%ul
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
- content_for(:title, "#{@procedure.libelle}")
|
||||
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
||||
['Historique des dossiers supprimés']] }
|
||||
.sub-header
|
||||
.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 }
|
||||
|
||||
.fr-container
|
||||
.fr-mb-3w
|
||||
= link_to "Retour à la démarche", instructeur_procedure_path(@procedure), class: "fr-link fr-icon-arrow-left-line fr-link--icon-left"
|
||||
|
||||
= render Dossiers::DeletedDossiersComponent.new(deleted_dossiers: @deleted_dossiers)
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
- content_for(:title, "Notifications pour #{@procedure.libelle}")
|
||||
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
||||
['Notifications']] }
|
||||
.sub-header
|
||||
.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 }
|
||||
|
||||
|
||||
.fr-container
|
||||
%h1.fr-h3
|
||||
%h1.fr-h4
|
||||
= t('.title')
|
||||
|
||||
= form_for @assign_to, url: update_email_notifications_instructeur_procedure_path(@procedure), html: { class: 'form' } do |form|
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
- content_for(:title, "Contacter les usagers pour #{@procedure.libelle}")
|
||||
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
||||
[t('.contact_users')]] }
|
||||
.sub-header
|
||||
.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 }
|
||||
|
||||
.messagerie.fr-container
|
||||
%h1 Contacter les usagers
|
||||
%h1.fr-h4= t('instructeurs.dossiers.header.banner.contact_users')
|
||||
%p.fr-highlight
|
||||
= t('.hint', count: @dossiers_without_groupe_count).html_safe
|
||||
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
- title = "Exports · #{@procedure.libelle}"
|
||||
- content_for(:title, title)
|
||||
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
||||
[t('.title')]] }
|
||||
.sub-header
|
||||
.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 }
|
||||
|
||||
.fr-container
|
||||
%h1.fr-h4= t('.title')
|
||||
.fr-tabs.mb-3
|
||||
%ul.fr-tabs__list{ role: 'tablist' }
|
||||
%li{ role: 'presentation' }
|
||||
|
|
|
@ -2,16 +2,12 @@
|
|||
|
||||
#procedure-show
|
||||
.sub-header
|
||||
.fr-container.flex
|
||||
|
||||
.procedure-logo{ style: "background-image: url(#{@procedure.logo_url})",
|
||||
role: 'img', 'aria-label': "logo de la démarche #{@procedure.libelle}" }
|
||||
|
||||
.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
|
||||
- if @can_download_dossiers
|
||||
= render Dossiers::ExportDropdownComponent.new(procedure: @procedure, export_templates: current_instructeur.export_templates_for(@procedure), export_url: method(:download_export_instructeur_procedure_path))
|
||||
%hr
|
||||
%h1.fr-h5.fr-mb-0= t('.file_tracking')
|
||||
|
||||
.fr-container.flex= render partial: "tabs", locals: { procedure: @procedure,
|
||||
statut: @statut,
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
- title = "Statistiques · #{@procedure.libelle}"
|
||||
- title = "Statistiques de la démarche"
|
||||
- content_for(:title, title)
|
||||
|
||||
= render partial: 'administrateurs/breadcrumbs',
|
||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
||||
[t('.title')]] }
|
||||
.sub-header
|
||||
.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 }
|
||||
|
||||
= render partial: 'shared/procedures/stats', locals: { title: title }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.fr-container.fr-my-4w
|
||||
%h1= title
|
||||
%h1.fr-h4= title
|
||||
.fr-grid-row.fr-grid-row--gutters
|
||||
- if @usual_traitement_time.present?
|
||||
.fr-col-xs-12
|
||||
|
|
|
@ -10,10 +10,14 @@ en:
|
|||
en_construction: This file is pending for instruction. The maximum delay is 6 months, you can extend the duration by a month by clicking on the underneath button.
|
||||
termine: This file had been processed and will soon expire. So it will be deleted soon. If you want to keep it, you can dowload a PDF file of it.
|
||||
button_delay_expiration: "Keep for one more month"
|
||||
follow_up: File tracking
|
||||
procedure_management: File management
|
||||
notification_management: notification management
|
||||
administrators_list: administrators list
|
||||
exports_list: exports and export templates
|
||||
exports_notification_label: A new export is ready to download
|
||||
statistics: statistics
|
||||
instructeurs: instructors
|
||||
contact_users: contact users (draft)
|
||||
contact_users: Contact users with a draft file
|
||||
downloads: Downloads
|
||||
user_support: User support
|
||||
|
|
|
@ -12,9 +12,18 @@ fr:
|
|||
termine: Le traitement de ce dossier est terminé, mais il va bientôt être supprimé. Si vous souhaitez en conserver une trace, vous pouvez le télécharger au format PDF.
|
||||
button_delay_expiration: "Conserver un mois de plus"
|
||||
notification_management: Gestion des notifications
|
||||
administrators_list: Voir les administrateurs
|
||||
exports_list: Voir les exports et modèles d'export
|
||||
follow_up: Suivi des dossiers
|
||||
procedure_management: Gestion de la démarche
|
||||
administrators_list: Administrateurs de la démarche
|
||||
exports_list: Liste des exports
|
||||
exports_models: Modèles d'exports
|
||||
exports_notification_label: Un nouvel export est prêt à être téléchargé
|
||||
statistics: Statistiques
|
||||
instructeurs: instructeurs
|
||||
contact_users: Contacter les usagers (brouillon)
|
||||
statistics: Statistiques de la démarche
|
||||
user_support: Accompagnement des usagers
|
||||
instructeurs: Gestion des instructeurs
|
||||
contact_users: Contacter les usagers avec un dossier "brouillon"
|
||||
preview: Prévisualiser le formulaire
|
||||
copy_link_button: Copier le lien usager de la démarche
|
||||
downloads: Téléchargements
|
||||
archives: Téléchargement mensuel
|
||||
procedure_navigation: "Navigation dans la démarche"
|
||||
|
|
|
@ -5,7 +5,7 @@ fr:
|
|||
utils:
|
||||
positive: Oui
|
||||
negative: Non
|
||||
title: Notifications par email
|
||||
title: Gestion des notifications
|
||||
subtitle: Configurez sur cette page les notifications que vous souhaitez recevoir par email pour cette démarche.
|
||||
for_each_file_submitted:
|
||||
title: Recevoir une notification à chaque dossier déposé
|
||||
|
|
|
@ -13,15 +13,14 @@ en:
|
|||
dossiers_close_to_expiration: expiring
|
||||
dossiers_supprimes: recently deleted
|
||||
copy_link_button: Copy the procedure link to clipboard
|
||||
show:
|
||||
file_tracking: File tracking
|
||||
email_usagers:
|
||||
contact_users: Contact users (draft)
|
||||
hint:
|
||||
zero: "There is no user with a draft."
|
||||
one: "You will send a message to <strong>1</strong> user."
|
||||
other: "You will send a message to <strong>%{count}</strong> users."
|
||||
administrators_list:
|
||||
title: "%{procedure_libelle} - n°%{procedure_id} - administrators"
|
||||
stats:
|
||||
title: Statistics
|
||||
title: Procedure administrators
|
||||
exports:
|
||||
title: Exports
|
||||
|
|
|
@ -13,13 +13,12 @@ fr:
|
|||
dossiers_close_to_expiration: expirant
|
||||
dossiers_supprimes: supprimés
|
||||
copy_link_button: Copier le lien de la démarche dans le presse-papiers
|
||||
show:
|
||||
file_tracking: Suivi des dossiers
|
||||
email_usagers:
|
||||
contact_users: Contacter les usagers (brouillon)
|
||||
hint:
|
||||
zero: "Aucun usager n'a de dossier en brouillon."
|
||||
one: "Vous allez envoyer un message à <strong>1</strong> usager ayant un dossier en brouillon."
|
||||
other: "Vous allez envoyer un message à <strong>%{count}</strong> usagers ayant un dossier en brouillon."
|
||||
administrators_list:
|
||||
title: "%{procedure_libelle} - n°%{procedure_id} - administrateurs"
|
||||
stats:
|
||||
title: Statistiques
|
||||
title: Administrateurs de la démarche
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 d’Ariane"
|
||||
preview: "Prévisualiser le formulaire"
|
||||
|
|
65
spec/helpers/navigation_helper_spec.rb
Normal file
65
spec/helpers/navigation_helper_spec.rb
Normal file
|
@ -0,0 +1,65 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe NavigationHelper do
|
||||
describe '#current_nav_section' do
|
||||
subject { helper.current_nav_section }
|
||||
|
||||
context 'when in procedure management section' do
|
||||
it 'returns procedure_management for administrateurs action' do
|
||||
allow(helper).to receive(:params).and_return({ action: 'administrateurs' })
|
||||
expect(subject).to eq('procedure_management')
|
||||
end
|
||||
|
||||
it 'returns procedure_management for stats action' do
|
||||
allow(helper).to receive(:params).and_return({ action: 'stats' })
|
||||
expect(subject).to eq('procedure_management')
|
||||
end
|
||||
|
||||
it 'returns procedure_management for email_notifications action' do
|
||||
allow(helper).to receive(:params).and_return({ action: 'email_notifications' })
|
||||
expect(subject).to eq('procedure_management')
|
||||
end
|
||||
|
||||
it 'returns procedure_management for deleted_dossiers action' do
|
||||
allow(helper).to receive(:params).and_return({ action: 'deleted_dossiers' })
|
||||
expect(subject).to eq('procedure_management')
|
||||
end
|
||||
|
||||
it 'returns procedure_management for groupe_instructeurs controller' do
|
||||
allow(helper).to receive(:params).and_return({ controller: 'instructeurs/groupe_instructeurs' })
|
||||
expect(subject).to eq('procedure_management')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when in user support section' do
|
||||
it 'returns user_support for email_usagers action' do
|
||||
allow(helper).to receive(:params).and_return({ action: 'email_usagers' })
|
||||
expect(subject).to eq('user_support')
|
||||
end
|
||||
|
||||
it 'returns user_support for apercu action' do
|
||||
allow(helper).to receive(:params).and_return({ action: 'apercu' })
|
||||
expect(subject).to eq('user_support')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when in downloads section' do
|
||||
it 'returns downloads for exports action' do
|
||||
allow(helper).to receive(:params).and_return({ action: 'exports' })
|
||||
expect(subject).to eq('downloads')
|
||||
end
|
||||
|
||||
it 'returns downloads for archives controller' do
|
||||
allow(helper).to receive(:params).and_return({ controller: 'instructeurs/archives' })
|
||||
expect(subject).to eq('downloads')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when in no specific section' do
|
||||
it 'returns follow_up by default' do
|
||||
allow(helper).to receive(:params).and_return({ action: 'show', controller: 'procedures' })
|
||||
expect(subject).to eq('follow_up')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -139,7 +139,8 @@ describe 'Instructing a dossier:', js: true do
|
|||
|
||||
expect(page).to have_text('Nous générons cet export.')
|
||||
|
||||
click_on "Voir les exports et modèles d'export"
|
||||
find("button", text: "Téléchargements").click
|
||||
click_on "Liste des exports"
|
||||
expect(page).to have_text("Export .csv d’un dossier « à suivre » demandé il y a moins d'une minute")
|
||||
expect(page).to have_text("En préparation")
|
||||
|
||||
|
|
|
@ -10,7 +10,9 @@ describe "procedure exports" do
|
|||
Flipper.enable(:export_template, procedure)
|
||||
visit instructeur_procedure_path(procedure)
|
||||
|
||||
click_on "Voir les exports et modèles d'export"
|
||||
find("button", text: "Téléchargements").click
|
||||
|
||||
click_on "Liste des exports"
|
||||
|
||||
click_on "Modèles d'export"
|
||||
|
||||
|
|
|
@ -9,7 +9,9 @@ describe "procedure exports zip" do
|
|||
scenario "create an export_template zip", chome: true do
|
||||
visit instructeur_procedure_path(procedure)
|
||||
|
||||
click_on "Voir les exports et modèles d'export"
|
||||
find("button", text: "Téléchargements").click
|
||||
|
||||
click_on "Liste des exports"
|
||||
|
||||
click_on "Modèles d'export"
|
||||
|
||||
|
|
Loading…
Reference in a new issue