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
|
.fr-container
|
||||||
%h1.fr-h2
|
%h1.fr-h4
|
||||||
Historique des dossiers supprimés
|
Historique des dossiers supprimés
|
||||||
|
|
||||||
.fr-container
|
.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}")
|
- 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
|
.container
|
||||||
%h1.mb-2 Archives
|
%h1.mb-2.fr-h4 Téléchargement mensuel
|
||||||
|
|
||||||
= render partial: "shared/archives/notice"
|
= 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 }
|
= 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}")
|
- content_for(:title, "Notifications pour #{@procedure.libelle}")
|
||||||
|
|
||||||
= render partial: 'administrateurs/breadcrumbs',
|
.sub-header
|
||||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
.fr-container.flex.column
|
||||||
['Groupes d’instructeurs']] }
|
= 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
|
.fr-container.groupe-instructeur
|
||||||
%h1 Gestion des Groupes
|
%h1.fr-h4 Gestion des instructeurs
|
||||||
.card
|
.card
|
||||||
%h2.fr-h3 Liste des groupes
|
%h2.fr-h3 Liste des groupes
|
||||||
%table.table.mt-2
|
%table.table.mt-2
|
||||||
|
|
|
@ -1,36 +1,61 @@
|
||||||
.procedure-header
|
.procedure-header
|
||||||
.flex.clipboard-container
|
.clipboard-container
|
||||||
%h1.fr-h3
|
%h1.fr-h3.fr-mb-0
|
||||||
= "#{procedure_libelle procedure} - n°#{procedure.id}"
|
= "#{procedure_libelle procedure} (n°#{procedure.id})"
|
||||||
= render Dsfr::CopyButtonComponent.new(title: t('instructeurs.procedures.index.copy_link_button'), text: commencer_url(procedure.path))
|
%nav.fr-nav#navigation{ role: "navigation", "aria-label": t('instructeurs.dossiers.header.banner.procedure_navigation') }
|
||||||
= link_to t('instructeurs.dossiers.header.banner.notification_management'), email_notifications_instructeur_procedure_path(procedure), class: 'header-link'
|
%ul.fr-nav__list
|
||||||
|
|
%li.fr-nav__item
|
||||||
= link_to t('instructeurs.dossiers.header.banner.statistics'), stats_instructeur_procedure_path(procedure), class: 'header-link'
|
= 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)
|
%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') }
|
||||||
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), admin_procedure_groupe_instructeurs_path(procedure), class: 'header-link'
|
= t('instructeurs.dossiers.header.banner.procedure_management')
|
||||||
- elsif procedure.instructeurs_self_management? && procedure.routing_enabled?
|
#menu-procedure.fr-collapse.fr-menu
|
||||||
|
|
%ul.fr-menu__list
|
||||||
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupes_path(procedure), class: 'header-link'
|
%li
|
||||||
- elsif procedure.instructeurs_self_management?
|
= link_to t('instructeurs.dossiers.header.banner.administrators_list'), administrateurs_instructeur_procedure_path(procedure), class: 'fr-nav__link'
|
||||||
|
|
|
||||||
= link_to t('instructeurs.dossiers.header.banner.instructeurs'), instructeur_groupe_path(procedure, procedure.defaut_groupe_instructeur), class: 'header-link'
|
|
||||||
|
|
||||||
- if can_send_groupe_message?(procedure)
|
- if procedure.instructeurs_self_management_enabled?
|
||||||
|
|
%li
|
||||||
= link_to t('instructeurs.dossiers.header.banner.contact_users'), email_usagers_instructeur_procedure_path(procedure), class: 'header-link'
|
= 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
|
- if @has_export_notification
|
||||||
%span.notifications{ 'aria-label': t('instructeurs.dossiers.header.banner.exports_notification_label') }
|
%span.notifications{ 'aria-label': t('instructeurs.dossiers.header.banner.exports_notification_label') }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#last-export-alert
|
#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
|
%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')),
|
= tab_item(t(tab_i18n_key_from_status('a-suivre')),
|
||||||
instructeur_procedure_path(procedure, statut: 'a-suivre'),
|
instructeur_procedure_path(procedure, statut: 'a-suivre'),
|
||||||
active: statut == 'a-suivre',
|
active: statut == 'a-suivre',
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
- content_for(:title, "Administrateurs de #{@procedure.libelle}")
|
- content_for(:title, "Administrateurs de #{@procedure.libelle}")
|
||||||
|
|
||||||
= render partial: 'administrateurs/breadcrumbs',
|
.sub-header
|
||||||
locals: { steps: [[@procedure.libelle.truncate_words(10), administrateurs_instructeur_procedure_path(@procedure)],['Administrateurs']] }
|
.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
|
.container
|
||||||
%h1
|
%h1.fr-h4
|
||||||
= t('instructeurs.procedures.administrators_list.title', procedure_id: @procedure.id, procedure_libelle: @procedure.libelle)
|
= t('instructeurs.procedures.administrators_list.title', procedure_id: @procedure.id, procedure_libelle: @procedure.libelle)
|
||||||
|
|
||||||
%ul
|
%ul
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
- content_for(:title, "#{@procedure.libelle}")
|
- content_for(:title, "#{@procedure.libelle}")
|
||||||
|
|
||||||
= render partial: 'administrateurs/breadcrumbs',
|
.sub-header
|
||||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
.fr-container.flex.column
|
||||||
['Historique des dossiers supprimés']] }
|
= 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)
|
= render Dossiers::DeletedDossiersComponent.new(deleted_dossiers: @deleted_dossiers)
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
- content_for(:title, "Notifications pour #{@procedure.libelle}")
|
- content_for(:title, "Notifications pour #{@procedure.libelle}")
|
||||||
|
|
||||||
= render partial: 'administrateurs/breadcrumbs',
|
.sub-header
|
||||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
.fr-container.flex.column
|
||||||
['Notifications']] }
|
= 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
|
.fr-container
|
||||||
%h1.fr-h3
|
%h1.fr-h4
|
||||||
= t('.title')
|
= t('.title')
|
||||||
|
|
||||||
= form_for @assign_to, url: update_email_notifications_instructeur_procedure_path(@procedure), html: { class: 'form' } do |form|
|
= 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}")
|
- content_for(:title, "Contacter les usagers pour #{@procedure.libelle}")
|
||||||
|
|
||||||
= render partial: 'administrateurs/breadcrumbs',
|
.sub-header
|
||||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
.fr-container.flex.column
|
||||||
[t('.contact_users')]] }
|
= 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
|
.messagerie.fr-container
|
||||||
%h1 Contacter les usagers
|
%h1.fr-h4= t('instructeurs.dossiers.header.banner.contact_users')
|
||||||
%p.fr-highlight
|
%p.fr-highlight
|
||||||
= t('.hint', count: @dossiers_without_groupe_count).html_safe
|
= t('.hint', count: @dossiers_without_groupe_count).html_safe
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,17 @@
|
||||||
- title = "Exports · #{@procedure.libelle}"
|
- title = "Exports · #{@procedure.libelle}"
|
||||||
- content_for(:title, title)
|
- content_for(:title, title)
|
||||||
|
|
||||||
= render partial: 'administrateurs/breadcrumbs',
|
.sub-header
|
||||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
.fr-container.flex.column
|
||||||
[t('.title')]] }
|
= 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
|
.fr-container
|
||||||
|
%h1.fr-h4= t('.title')
|
||||||
.fr-tabs.mb-3
|
.fr-tabs.mb-3
|
||||||
%ul.fr-tabs__list{ role: 'tablist' }
|
%ul.fr-tabs__list{ role: 'tablist' }
|
||||||
%li{ role: 'presentation' }
|
%li{ role: 'presentation' }
|
||||||
|
|
|
@ -2,16 +2,12 @@
|
||||||
|
|
||||||
#procedure-show
|
#procedure-show
|
||||||
.sub-header
|
.sub-header
|
||||||
.fr-container.flex
|
.fr-container.flex.column
|
||||||
|
= render partial: 'instructeurs/breadcrumbs',
|
||||||
.procedure-logo{ style: "background-image: url(#{@procedure.logo_url})",
|
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)]] }
|
||||||
role: 'img', 'aria-label': "logo de la démarche #{@procedure.libelle}" }
|
|
||||||
|
|
||||||
= render partial: 'header', locals: { procedure: @procedure, statut: @statut }
|
= render partial: 'header', locals: { procedure: @procedure, statut: @statut }
|
||||||
|
%hr
|
||||||
.procedure-actions
|
%h1.fr-h5.fr-mb-0= t('.file_tracking')
|
||||||
- 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))
|
|
||||||
|
|
||||||
.fr-container.flex= render partial: "tabs", locals: { procedure: @procedure,
|
.fr-container.flex= render partial: "tabs", locals: { procedure: @procedure,
|
||||||
statut: @statut,
|
statut: @statut,
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
- title = "Statistiques · #{@procedure.libelle}"
|
- title = "Statistiques de la démarche"
|
||||||
- content_for(:title, title)
|
- content_for(:title, title)
|
||||||
|
|
||||||
= render partial: 'administrateurs/breadcrumbs',
|
.sub-header
|
||||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
.fr-container.flex.column
|
||||||
[t('.title')]] }
|
= 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 }
|
= render partial: 'shared/procedures/stats', locals: { title: title }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.fr-container.fr-my-4w
|
.fr-container.fr-my-4w
|
||||||
%h1= title
|
%h1.fr-h4= title
|
||||||
.fr-grid-row.fr-grid-row--gutters
|
.fr-grid-row.fr-grid-row--gutters
|
||||||
- if @usual_traitement_time.present?
|
- if @usual_traitement_time.present?
|
||||||
.fr-col-xs-12
|
.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.
|
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.
|
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"
|
button_delay_expiration: "Keep for one more month"
|
||||||
|
follow_up: File tracking
|
||||||
|
procedure_management: File management
|
||||||
notification_management: notification management
|
notification_management: notification management
|
||||||
administrators_list: administrators list
|
administrators_list: administrators list
|
||||||
exports_list: exports and export templates
|
exports_list: exports and export templates
|
||||||
exports_notification_label: A new export is ready to download
|
exports_notification_label: A new export is ready to download
|
||||||
statistics: statistics
|
statistics: statistics
|
||||||
instructeurs: instructors
|
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.
|
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"
|
button_delay_expiration: "Conserver un mois de plus"
|
||||||
notification_management: Gestion des notifications
|
notification_management: Gestion des notifications
|
||||||
administrators_list: Voir les administrateurs
|
follow_up: Suivi des dossiers
|
||||||
exports_list: Voir les exports et modèles d'export
|
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é
|
exports_notification_label: Un nouvel export est prêt à être téléchargé
|
||||||
statistics: Statistiques
|
statistics: Statistiques de la démarche
|
||||||
instructeurs: instructeurs
|
user_support: Accompagnement des usagers
|
||||||
contact_users: Contacter les usagers (brouillon)
|
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:
|
utils:
|
||||||
positive: Oui
|
positive: Oui
|
||||||
negative: Non
|
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.
|
subtitle: Configurez sur cette page les notifications que vous souhaitez recevoir par email pour cette démarche.
|
||||||
for_each_file_submitted:
|
for_each_file_submitted:
|
||||||
title: Recevoir une notification à chaque dossier déposé
|
title: Recevoir une notification à chaque dossier déposé
|
||||||
|
|
|
@ -13,15 +13,14 @@ en:
|
||||||
dossiers_close_to_expiration: expiring
|
dossiers_close_to_expiration: expiring
|
||||||
dossiers_supprimes: recently deleted
|
dossiers_supprimes: recently deleted
|
||||||
copy_link_button: Copy the procedure link to clipboard
|
copy_link_button: Copy the procedure link to clipboard
|
||||||
|
show:
|
||||||
|
file_tracking: File tracking
|
||||||
email_usagers:
|
email_usagers:
|
||||||
contact_users: Contact users (draft)
|
|
||||||
hint:
|
hint:
|
||||||
zero: "There is no user with a draft."
|
zero: "There is no user with a draft."
|
||||||
one: "You will send a message to <strong>1</strong> user."
|
one: "You will send a message to <strong>1</strong> user."
|
||||||
other: "You will send a message to <strong>%{count}</strong> users."
|
other: "You will send a message to <strong>%{count}</strong> users."
|
||||||
administrators_list:
|
administrators_list:
|
||||||
title: "%{procedure_libelle} - n°%{procedure_id} - administrators"
|
title: Procedure administrators
|
||||||
stats:
|
|
||||||
title: Statistics
|
|
||||||
exports:
|
exports:
|
||||||
title: Exports
|
title: Exports
|
||||||
|
|
|
@ -13,13 +13,12 @@ fr:
|
||||||
dossiers_close_to_expiration: expirant
|
dossiers_close_to_expiration: expirant
|
||||||
dossiers_supprimes: supprimés
|
dossiers_supprimes: supprimés
|
||||||
copy_link_button: Copier le lien de la démarche dans le presse-papiers
|
copy_link_button: Copier le lien de la démarche dans le presse-papiers
|
||||||
|
show:
|
||||||
|
file_tracking: Suivi des dossiers
|
||||||
email_usagers:
|
email_usagers:
|
||||||
contact_users: Contacter les usagers (brouillon)
|
|
||||||
hint:
|
hint:
|
||||||
zero: "Aucun usager n'a de dossier en brouillon."
|
zero: "Aucun usager n'a de dossier en brouillon."
|
||||||
one: "Vous allez envoyer un message à <strong>1</strong> usager ayant un 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."
|
other: "Vous allez envoyer un message à <strong>%{count}</strong> usagers ayant un dossier en brouillon."
|
||||||
administrators_list:
|
administrators_list:
|
||||||
title: "%{procedure_libelle} - n°%{procedure_id} - administrateurs"
|
title: Administrateurs de la démarche
|
||||||
stats:
|
|
||||||
title: Statistiques
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
en:
|
en:
|
||||||
layouts:
|
layouts:
|
||||||
breadcrumb:
|
breadcrumb:
|
||||||
root: "Home"
|
root: "Home - List of procedures"
|
||||||
you_are_here: "You are here"
|
you_are_here: "You are here"
|
||||||
show: Show breadcrumb
|
show: Show breadcrumb
|
||||||
preview: "Preview the form"
|
preview: "Preview the form"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
fr:
|
fr:
|
||||||
layouts:
|
layouts:
|
||||||
breadcrumb:
|
breadcrumb:
|
||||||
root: "Accueil"
|
root: "Accueil - Liste des démarches"
|
||||||
you_are_here: "Vous êtes ici"
|
you_are_here: "Vous êtes ici"
|
||||||
show: "Voir le fil d’Ariane"
|
show: "Voir le fil d’Ariane"
|
||||||
preview: "Prévisualiser le formulaire"
|
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.')
|
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("Export .csv d’un dossier « à suivre » demandé il y a moins d'une minute")
|
||||||
expect(page).to have_text("En préparation")
|
expect(page).to have_text("En préparation")
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,9 @@ describe "procedure exports" do
|
||||||
Flipper.enable(:export_template, procedure)
|
Flipper.enable(:export_template, procedure)
|
||||||
visit instructeur_procedure_path(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"
|
click_on "Modèles d'export"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,9 @@ describe "procedure exports zip" do
|
||||||
scenario "create an export_template zip", chome: true do
|
scenario "create an export_template zip", chome: true do
|
||||||
visit instructeur_procedure_path(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"
|
click_on "Modèles d'export"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue