Merge pull request #10459 from demarches-simplifiees/rename-footer-button-for-admin-ldu

[admin] Harmoniser navigation dans l'interface de configuration
This commit is contained in:
Lisa Durand 2024-05-30 15:28:27 +00:00 committed by GitHub
commit a900718299
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 215 additions and 201 deletions

View file

@ -1,5 +1,5 @@
---
fr:
title:
one: Modification
other: Modifications
one: Modification du formulaire
other: Modifications du formulaire

View file

@ -8,5 +8,5 @@
%h3.fr-h6
= t('.title', count: @procedure.revisions_count)
%p.fr-tile-subtitle Historique des modifications du formulaire
%p.fr-tile-subtitle Historique des modifications apportées au formulaire
%p.fr-btn.fr-btn--tertiary Voir

View file

@ -1,3 +1,3 @@
---
fr:
title: MonAvis
title: Bouton « MonAvis »

View file

@ -0,0 +1,10 @@
class Procedure::FixedFooterComponent < ApplicationComponent
def initialize(procedure:, form: nil, is_form_disabled: nil, extra_class_names: nil)
@procedure = procedure
@form = form
@is_form_disabled = is_form_disabled
@extra_class_names = extra_class_names
end
attr_reader :form, :is_form_disabled, :extra_class_names
end

View file

@ -0,0 +1,4 @@
fr:
back: Revenir à l'écran de gestion
submit: Enregistrer
cancel: Annuler et revenir à l'écran de gestion

View file

@ -0,0 +1,23 @@
- content_for(:footer) do
&nbsp;
- if form
.padded-fixed-footer
.fixed-footer
.fr-container
.fr-grid-row
%div{ class: "fr-col-12 #{extra_class_names}" }
%ul.fr-btns-group.fr-btns-group--inline-md
%li
= link_to t('.cancel'), admin_procedure_path(id: @procedure), class: 'fr-btn fr-btn--secondary', data: { confirm: 'Si vous avez fait des modifications elles ne seront pas sauvegardées.'}
%li
= form.submit t(".submit"), class: "fr-btn", disabled: is_form_disabled
- else
.padded-fixed-footer
.fixed-footer
.fr-container
.fr-grid-row
%div{ class: "fr-col-12 fr-pb-2w #{extra_class_names}" }
= link_to admin_procedure_path(id: @procedure), class: 'fr-link fr-icon-arrow-left-line fr-link--icon-left fr-mb-2w' do
= t('.back')

View file

@ -1,5 +1,5 @@
- content_for(:title, 'Instructeurs')
%h1 Gestion des instructeurs
%h1.fr-h2 Instructeurs
= render partial: 'administrateurs/groupe_instructeurs/import_export',
locals: { procedure: @procedure }
@ -10,3 +10,6 @@
instructeurs: @instructeurs,
available_instructeur_emails: @available_instructeur_emails,
disabled_as_super_admin: @disabled_as_super_admin }
= render Procedure::FixedFooterComponent.new(procedure: @procedure)

View file

@ -11,7 +11,7 @@ en:
When an instructor asks for a file to be corrected, the countdown of the delay is interrupted.
The delay resumes when the applicant resubmits their file stating that they have made the requested corrections.
If the file has been declared incomplete, the delay will be reset, regardless of the configuration below.
submit: Apply SVA/SVR configuration
submit: Save
cancel: Cancel
decision_buttons:
disabled: "Disabled"

View file

@ -11,7 +11,7 @@ fr:
Lorsquun instructeur demande de corriger un dossier, le décompte du délai est interrompu.
Le délai reprend lorsque le demandeur redépose son dossier en déclarant avoir effectué les corrections demandées.
Si le dossier avait été déclaré incomplet, le délai sera réinitialisé, quelle que soit la configuration ci-dessous.
submit: Appliquer la configuration SVA/SVR
submit: Enregistrer
cancel: Annuler
decision_buttons:
disabled: "Désactivé"

View file

@ -1,40 +1,40 @@
= form_for [procedure, configuration], url: admin_procedure_sva_svr_path(procedure), method: :put do |f|
- if !procedure.feature_enabled?(:sva)
.fr-alert.fr-alert--info.fr-alert--sm.fr-my-8w
%p
Pour activer le paramétrage de cette fonctionnalité, contactez-nous sur
= link_to CONTACT_EMAIL, "mailto:#{CONTACT_EMAIL}", **helpers.external_link_attributes
en indiquant votre numéro de démarche (#{@procedure.id}) et le cadre dapplication du SVA/SVR.
.fr-container
- if !procedure.feature_enabled?(:sva)
.fr-alert.fr-alert--info.fr-alert--sm.fr-mb-5w
%p
Pour activer le paramétrage de cette fonctionnalité, contactez-nous sur
= link_to CONTACT_EMAIL, "mailto:#{CONTACT_EMAIL}", **helpers.external_link_attributes
en indiquant votre numéro de démarche (#{@procedure.id}) et le cadre dapplication du SVA/SVR.
- elsif procedure.publiee? && !procedure.sva_svr_enabled?
.fr-alert.fr-alert--info.fr-alert--sm.fr-mb-4w
%p= t('.notice_new_files_only')
- elsif procedure.publiee? && !procedure.sva_svr_enabled?
.fr-alert.fr-alert--info.fr-alert--sm.fr-mb-4w
%p= t('.notice_new_files_only')
- if procedure.publiee? && procedure.sva_svr_enabled?
.fr-alert.fr-alert--warning.fr-alert--sm.fr-mb-4w
%p= t('.notice_edit_denied')
- if procedure.publiee? && procedure.sva_svr_enabled?
.fr-alert.fr-alert--warning.fr-alert--sm.fr-mb-4w
%p= t('.notice_edit_denied')
%fieldset.fr-fieldset
%legend.fr-fieldset__legend= t(".rule")
= render Dsfr::RadioButtonListComponent.new(form: f, target: :decision, buttons: decision_buttons, error: configuration.errors[:decision].first)
%fieldset.fr-fieldset
%legend.fr-fieldset__legend= t(".rule")
= render Dsfr::RadioButtonListComponent.new(form: f, target: :decision, buttons: decision_buttons, error: configuration.errors[:decision].first)
%fieldset.fr-fieldset
%legend.fr-fieldset__legend= t(".delay")
.fr-fieldset__element.fr-fieldset__element--inline
.fr-input-group
= f.number_field :period, class: 'fr-input', disabled: form_disabled?
.fr-fieldset__element.fr-fieldset__element--inline
.fr-select-group
= f.select :unit, options_for_select(SVASVRConfiguration.unit_options.map { [t(_1, scope: ".unit_labels"), _1] }, selected: configuration.unit), {}, class: 'fr-select', disabled: form_disabled?
%fieldset.fr-fieldset
%legend.fr-fieldset__legend= t(".delay")
.fr-fieldset__element.fr-fieldset__element--inline
.fr-input-group
= f.number_field :period, class: 'fr-input', disabled: form_disabled?
.fr-fieldset__element.fr-fieldset__element--inline
.fr-select-group
= f.select :unit, options_for_select(SVASVRConfiguration.unit_options.map { [t(_1, scope: ".unit_labels"), _1] }, selected: configuration.unit), {}, class: 'fr-select', disabled: form_disabled?
%fieldset.fr-fieldset
%legend.fr-fieldset__legend
= t(".resume_method")
%fieldset.fr-fieldset
%legend.fr-fieldset__legend
= t(".resume_method")
%span.fr-hint-text
= t(".resume_intro")
%span.fr-hint-text
= t(".resume_intro")
= render Dsfr::RadioButtonListComponent.new(form: f, target: :resume, buttons: resume_buttons)
= render Dsfr::RadioButtonListComponent.new(form: f, target: :resume, buttons: resume_buttons)
= f.submit t(".submit"), class: "fr-btn", disabled: form_disabled?
= link_to t(".cancel"), admin_procedure_path(procedure.id), class: "fr-btn fr-btn--secondary fr-ml-2w"
= render Procedure::FixedFooterComponent.new(procedure: @procedure, form: f, is_form_disabled: form_disabled?)

View file

@ -270,10 +270,11 @@ module Administrateurs
def update_monavis
if !@procedure.update(procedure_params)
flash.now.alert = @procedure.errors.full_messages
render 'monavis'
else
flash.notice = 'le champ MonAvis a bien été mis à jour'
redirect_to admin_procedure_path(id: @procedure.id)
end
render 'monavis'
end
def accuse_lecture
@ -298,8 +299,8 @@ module Administrateurs
APIEntreprise::PrivilegesAdapter.new(token).valid? &&
@procedure.save
redirect_to jeton_admin_procedure_path(procedure_id: params[:procedure_id]),
notice: 'Le jeton a bien été mis à jour'
flash.notice = 'Le jeton a bien été mis à jour'
redirect_to admin_procedure_path(id: @procedure.id)
else
flash.now.alert = "Mise à jour impossible : le jeton nest pas valide"

View file

@ -3,31 +3,31 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_path],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Fin de dépot']] }
['Fin de dépôt']] }
.procedure-form
.procedure-form__columns.container
= form_for @dossier_submitted_message,
url: url_for({ controller: 'administrateurs/dossier_submitted_messages', action: :update, id: @procedure.id }),
html: { class: 'form procedure-form__column--form fr-background-alt--blue-france' } do |f|
= form_for @dossier_submitted_message,
url: url_for({ controller: 'administrateurs/dossier_submitted_messages', action: :update, id: @procedure.id }),
html: { class: 'form' } do |f|
%h1.page-title
Fin du dépot
%p.notice
L'utilisateur se verra afficher ce message une fois le dossier envoyé
.procedure-form
.procedure-form__columns.container
.procedure-form__column--form.fr-background-alt--blue-france.fr-pt-5w
%h1.fr-h2
Fin de dépôt
%p.notice
L'utilisateur se verra afficher ce message une fois le dossier envoyé
= render partial: 'administrateurs/dossier_submitted_messages/informations', locals: { f: f }
= render partial: 'administrateurs/dossier_submitted_messages/informations', locals: { f: f }
.procedure-form__actions
.actions-left
= f.submit 'Enregistrer', class: 'fr-btn send'
.procedure-form__column--preview
%h3
.procedure-form__preview-title
Aperçu
.notice
Cet aperçu est mis à jour après chaque sauvegarde.
.procedure-form__column--preview
%h3
.procedure-form__preview-title
Aperçu
.notice
Cet aperçu est mis à jour après chaque sauvegarde.
.procedure-preview
= render partial: 'users/dossiers/merci', locals: { procedure: @procedure, dossier: nil}
.procedure-preview
= render partial: 'users/dossiers/merci', locals: { procedure: @procedure, dossier: nil}
= render Procedure::FixedFooterComponent.new(procedure: @procedure, form: f)

View file

@ -1,13 +1,13 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_path],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Liste des experts']] }
['Avis externes']] }
.container
%h1.page-title.mt-2= t('.titles.main', libelle: @procedure.libelle)
.container.groupe-instructeur
.fr-container
%h1.fr-h2
Avis externes
.groupe-instructeur
.card
.card-title= t('.titles.allow_invite_experts')
%p= t('.descriptions.allow_invite_experts')
@ -107,3 +107,5 @@
.blank-tab
%h2.empty-text Aucun expert invité pour le moment.
%p.empty-text-details Les instructeurs de cette démarche nont pas encore fait appel aux experts.
= render Procedure::FixedFooterComponent.new(procedure: @procedure)

View file

@ -2,14 +2,13 @@
locals: { steps: [['Démarches', admin_procedures_path],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
[Procedure.human_attribute_name(:jeton_api_particulier), admin_procedure_api_particulier_path(@procedure)],
['Jeton']] }
['Jeton Particulier']] }
.container
%h1.page-title
= t('.configure_token')
.fr-container
%h1.fr-h2
Jeton Particulier
.container
%h1
.fr-container
= form_with model: @procedure, url: admin_procedure_api_particulier_jeton_path, local: true do |f|
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
- c.with_body do

View file

@ -6,7 +6,7 @@
.fr-container
.fr-grid-row.fr-grid-row--gutters
.fr-col-12
%h1 Configuration des emails
%h1.fr-h2 Configuration des emails
- if @procedure.accuse_lecture?
= render Dsfr::AlertComponent.new(state: :info, size: :sm) do |c|
- c.with_body do
@ -18,10 +18,4 @@
= render Procedure::EmailTemplateCardComponent.new(email_template: mail_template)
.padded-fixed-footer
.fixed-footer
.fr-container
.fr-grid-row
.fr-col-12.fr-pb-2w
= link_to admin_procedure_path(id: @procedure), class: 'fr-link fr-icon-arrow-left-line fr-link--icon-left fr-mb-2w' do
Revenir à la démarche
= render Procedure::FixedFooterComponent.new(procedure: @procedure)

View file

@ -4,10 +4,14 @@
['Administrateurs']], preview: false }
.fr-container
%h1 Gérer les administrateurs de « #{@procedure.libelle} »
%h1.fr-h2 Administrateurs
.fr-table.fr-table--bordered
.fr-mb-4w
= render 'add_admin_form', procedure: @procedure, disabled_as_super_admin: administrateur_as_manager?
.fr-table.fr-table--bordered.fr-table--layout-fixed
%table
%caption Liste des administrateurs
%thead
%th= 'Adresse email'
%th= 'Enregistré le'
@ -16,5 +20,4 @@
%tbody#administrateurs
= render(Procedure::ProcedureAdministrateurs::AdministrateurComponent.with_collection(@procedure.administrateurs.order('users.email'), procedure: @procedure))
.fr-mt-4w
= render 'add_admin_form', procedure: @procedure, disabled_as_super_admin: administrateur_as_manager?
= render Procedure::FixedFooterComponent.new(procedure: @procedure)

View file

@ -14,5 +14,5 @@
Une fois en possession du code généré sur le site MonAvis, vous pouvez le coller dans le champ ci-dessous :
.fr-input-group
= f.label :monavis_embed, "Mon avis", class: "fr-label"
= f.label :monavis_embed, "Code généré sur le site MonAvis", class: "fr-label"
= f.text_area :monavis_embed, rows: '6', placeholder: '<a href="https://monavis.numerique.gouv.fr/Demarches/123456?&view-mode=formulaire-avis&nd_mode=en-ligne-enti%C3%A8rement&nd_source=button&key=cd4a872d4"><img src="https://monavis.numerique.gouv.fr/monavis-static/bouton-bleu.png" alt="Je donne mon avis" title="Je donne mon avis sur cette démarche" /></a>', class: 'fr-input'

View file

@ -6,7 +6,7 @@
.fr-container
.fr-grid-row
.fr-col-12.fr-col-offset-md-2.fr-col-md-8
%h1.page-title
%h1.fr-h2
Accusé de lecture
= render Dsfr::CalloutComponent.new(title: nil) do |c|
@ -33,11 +33,4 @@
hint: "Laccusé de lecture est à activer uniquement pour les démarches avec voies de recours car il complexifie laccès à la décision finale pour les usagers",
opt: {"checked" => @procedure.accuse_lecture})
.padded-fixed-footer
.fixed-footer
.fr-container
.fr-grid-row
.fr-col-12.fr-col-offset-md-2.fr-col-md-8
%ul.fr-btns-group.fr-btns-group--inline-md
%li
= link_to 'Enregistrer et revenir à la page de suivi', admin_procedure_path(id: @procedure), class: 'fr-btn'
= render Procedure::FixedFooterComponent.new(procedure: @procedure, extra_class_names: 'fr-col-offset-md-2 fr-col-md-8' )

View file

@ -1,10 +1,10 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Configuration des annotations privées']], preview: true }
['Annotations privées']], preview: true }
.fr-container
%h1 Configuration des annotations privées
%h1.fr-h2 Annotations privées
= render NestedForms::FormOwnerComponent.new
.fr-grid-row
.fr-col
@ -13,9 +13,9 @@
.padded-fixed-footer
.fixed-footer
.fr-container
%ul.fr-btns-group.fr-btns-group--inline-md
%ul.fr-btns-group.fr-btns-group--inline-md.fr-ml-0
%li
= link_to t('continue_annotations', scope: [:layouts, :breadcrumb]), admin_procedure_path(@procedure), title: t('continue_annotations', scope: [:layouts, :breadcrumb]), class: 'fr-btn'
= link_to "Revenir à l'écran de gestion", admin_procedure_path(@procedure), title: t('continue_annotations', scope: [:layouts, :breadcrumb]), class: 'fr-link fr-icon-arrow-left-line fr-link--icon-left fr-mb-2w fr-mr-2w'
- if @procedure.draft_revision.revision_types_de_champ_private.count > 0
%li
= link_to t('preview_annotations', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure, params: {tab: 'annotations-privees'}), target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--secondary'
= link_to t('preview_annotations', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure, params: {tab: 'annotations-privees'}), target: "_blank", rel: "noopener", class: 'fr-link fr-mb-2w'

View file

@ -1,10 +1,10 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Configuration des champs']], preview: @procedure.draft_revision.valid? }
['Champs du formulaire']], preview: @procedure.draft_revision.valid? }
.fr-container
%h1 Configuration des champs
%h1.fr-h2 Champs du formulaire
= render NestedForms::FormOwnerComponent.new
.fr-grid-row
= render partial: 'champs_summary'
@ -15,12 +15,13 @@
.fixed-footer
.fr-container
.flex
%ul.fr-btns-group.fr-btns-group--inline-md
%ul.fr-btns-group.fr-btns-group--inline-md.fr-ml-0
%li
= link_to t('continue', scope: [:layouts, :breadcrumb]), admin_procedure_path(@procedure), title: t('continue_title', scope: [:layouts, :breadcrumb]), class: 'fr-btn'
= link_to admin_procedure_path(id: @procedure), class: 'fr-link fr-icon-arrow-left-line fr-link--icon-left fr-mb-2w fr-mr-2w' do
Revenir à l'écran de gestion
- if @procedure.draft_revision.revision_types_de_champ_public.count > 0
%li
= link_to t('preview', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'fr-btn fr-btn--secondary'
= link_to t('preview', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'fr-link fr-mb-2w'
.fr-ml-auto
#autosave-notice.hidden
= render TypesDeChampEditor::EstimatedFillDurationComponent.new(revision: @procedure.draft_revision, is_annotation: false)

View file

@ -3,7 +3,7 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Description']] }
['Présentation']] }
= render NestedForms::FormOwnerComponent.new
= form_for @procedure,
@ -12,17 +12,8 @@
.fr-container
.fr-grid-row
.fr-col-12.fr-col-offset-md-2.fr-col-md-8
%h1.fr-h2 Description
%h1.fr-h2 Présentation
= render partial: 'administrateurs/procedures/informations', locals: { f: f }
.padded-fixed-footer
.fixed-footer
.fr-container
.fr-grid-row
.fr-col-12.fr-col-offset-md-2.fr-col-md-8
%ul.fr-btns-group.fr-btns-group--inline-md
%li
= f.button 'Enregistrer', class: 'fr-btn'
%li
= link_to 'Annuler', admin_procedure_path(id: @procedure), class: 'fr-btn fr-btn--secondary', data: { confirm: 'Êtes-vous sûr de vouloir annuler les modifications effectuées ?'}
= render Procedure::FixedFooterComponent.new(procedure: @procedure, form: f, extra_class_names: 'fr-col-offset-md-2 fr-col-md-8')

View file

@ -1,15 +1,13 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Jeton']] }
['Jeton Entreprise']] }
.container
%h1.page-title
Configurer le jeton API Entreprise
.fr-container
%h1.fr-h2 Jeton Entreprise
.container
%h1
= form_with model: @procedure, url: url_for({ controller: 'administrateurs/procedures', action: :update_jeton }) do |f|
= form_with model: @procedure, url: url_for({ controller: 'administrateurs/procedures', action: :update_jeton }) do |f|
.fr-container
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
- c.with_body do
%p
@ -23,4 +21,5 @@
.fr-input-group
= f.label :api_entreprise_token, "Jeton", class: 'fr-label'
= f.password_field :api_entreprise_token, value: @procedure.read_attribute(:api_entreprise_token), class: 'fr-input'
= f.button 'Enregistrer', class: 'fr-btn'
= render Procedure::FixedFooterComponent.new(procedure: @procedure, form: f)

View file

@ -1,12 +1,12 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Modifications']] }
.container
%h1.page-title
['Historique des modifications du formulaire']] }
.fr-container
%h1.fr-h2
Historique des modifications du formulaire
.container
.fr-container
- previous_revision = nil
- @procedure.revisions.each do |revision|
- if previous_revision.present? && !revision.draft?
@ -30,3 +30,5 @@
%p= t('.dossiers_en_instruction', count: dossiers_en_instruction_count)
= render Procedure::RevisionChangesComponent.new changes:, previous_revision:
- previous_revision = revision
= render Procedure::FixedFooterComponent.new(procedure: @procedure)

View file

@ -3,12 +3,12 @@
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['MonAvis']] }
.container
%h1.page-title
Insérer un lien vers « MonAvis »
.fr-container
%h1.fr-h2
Bouton « MonAvis »
.container
%h1
= form_for @procedure, url: url_for({ controller: 'administrateurs/procedures', action: :update_monavis }), html: { class: 'form', multipart: true } do |f|
= form_for @procedure, url: url_for({ controller: 'administrateurs/procedures', action: :update_monavis }), html: { class: 'form', multipart: true } do |f|
.fr-container
= render partial: 'monavis', locals: { f: f }
= f.button 'Enregistrer', class: 'fr-btn'
= render Procedure::FixedFooterComponent.new(procedure: @procedure, form: f)

View file

@ -4,12 +4,12 @@
locals: { steps: [['Démarches', admin_procedures_back_path(@procedure)],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Description']] }
.container
= form_for @procedure,
url: url_for({ controller: 'administrateurs/procedures', action: :update, id: @procedure.id }),
html: { multipart: true } do |f|
= form_for @procedure,
url: url_for({ controller: 'administrateurs/procedures', action: :update, id: @procedure.id }),
html: { multipart: true } do |f|
%h1.page-title Zones
.fr-container
%h1.fr-h2 Zones
- if Rails.application.config.ds_zonage_enabled
%fieldset.fr-fieldset{ aria: { labelledby: "zones-legend"} }
@ -25,7 +25,4 @@
= b.check_box
= b.label class: "fr-label"
.procedure-form__actions.sticky--bottom
.actions-right
= link_to 'Annuler', admin_procedure_path(id: @procedure), class: 'fr-btn fr-btn--tertiary fr-mr-2w', data: { confirm: 'Êtes-vous sûr de vouloir annuler les modifications effectuées ?'}
= f.button 'Enregistrer', class: 'fr-btn fr-btn--primary'
= render Procedure::FixedFooterComponent.new(procedure: @procedure, form: f)

View file

@ -34,11 +34,4 @@
- if procedure_id.present?
= hidden_field_tag :procedure_id, procedure_id
.padded-fixed-footer
.fixed-footer
.fr-container
%ul.fr-btns-group.fr-btns-group--inline-md
%li
= f.submit "Enregistrer", class: "fr-btn"
%li
= link_to "Annuler et revenir à la page de suivi", admin_procedure_path(id: @procedure.id), class: "fr-btn fr-btn--secondary"
= render Procedure::FixedFooterComponent.new(procedure: @procedure, form: f)

View file

@ -5,21 +5,22 @@
['Modifier le service']] }
.container
.fr-container
.flex.justify-between.align-center.fr-mb-3w
= link_to "Liste de tous les services", admin_services_path(procedure_id: @procedure.id), class: "fr-link fr-icon-arrow-left-line fr-link--icon-left"
= link_to "+ Nouveau service", new_admin_service_path(procedure_id: @procedure.id), class: "fr-btn"
%h1.fr-h2
Modifier le service
- other_services = @service.procedures.reject {|procedure| procedure.id == @procedure.id }
- if other_services.count > 1
= render Dsfr::AlertComponent.new(state: :warning, title: "Modifier ce service impactera la ou les démarches qui sont rattachée/s") do |c|
= render Dsfr::AlertComponent.new(state: :warning, title: "Modifier ce service impactera la ou les démarches qui sont rattachée/s", extra_class_names: 'fr-mb-3w') do |c|
- c.with_body do
%ul
- other_services.each do |proc|
%li= "#{proc.libelle} (N° #{proc.id})"
%p.mt-3 Si vous souhaitez modifier uniquement les informations pour ce service, créez un nouveau service puis associez-le à la démarche
%p.mt-3
= link_to "+ Nouveau service", new_admin_service_path(procedure_id: @procedure.id), class: "fr-btn"
%h1.mt-2 Modifier le service
= render partial: 'form',
locals: { service: @service, procedure_id: @procedure.id }

View file

@ -1,34 +1,37 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_path],
[@procedure.libelle.truncate_words(10), admin_procedure_path(@procedure)],
['Choix du service']] }
['Service']] }
#services-index.container
%h1.fr-h1 Liste des Services
%h2.fr-h4 La démarche “#{@procedure.libelle}” peut être affectée aux services dans la liste ci-dessous
#services-index.fr-container
%h1.fr-h2 Service
%table.fr-table.width-100.mt-3
%thead
%tr
%th{ scope: "col" }
Nom
%th.change{ scope: "col" }
= link_to "Nouveau service", new_admin_service_path(procedure_id: @procedure.id), class: "fr-btn fr-btn--secondary"
%tbody
- @services.each do |service|
.fr-table.fr-table--layout-fixed
%table
%caption Liste des services pouvant être affectés à la démarche
%thead
%tr
%td
= service.nom
%td.change
- if @procedure.service == service
%strong.mr-2 (Assigné)
- else
= button_to "Assigner", add_to_procedure_admin_services_path(procedure: { id: @procedure.id, service_id: service.id, }), method: :patch, class: 'link mr-2', form_class: 'inline'
= link_to('Modifier', edit_admin_service_path(service, procedure_id: @procedure.id), class: 'link my-2')
- if @procedure.service != service
= link_to 'Supprimer',
admin_service_path(service, procedure_id: @procedure.id),
method: :delete,
data: { confirm: "Confirmez vous la suppression de #{service.nom}" },
class: 'btn btn-link ml-2'
%th{ scope: "col" }
Nom
%th.change{ scope: "col" }
= link_to "Nouveau service", new_admin_service_path(procedure_id: @procedure.id), class: "fr-btn fr-btn--secondary"
%tbody
- @services.each do |service|
%tr
%td
= service.nom
%td.change
- if @procedure.service == service
%strong.mr-2 (Assigné)
- else
= button_to "Assigner", add_to_procedure_admin_services_path(procedure: { id: @procedure.id, service_id: service.id, }), method: :patch, class: 'link mr-2', form_class: 'inline'
= link_to('Modifier', edit_admin_service_path(service, procedure_id: @procedure.id), class: 'link my-2')
- if @procedure.service != service
= link_to 'Supprimer',
admin_service_path(service, procedure_id: @procedure.id),
method: :delete,
data: { confirm: "Confirmez vous la suppression de #{service.nom}" },
class: 'btn btn-link ml-2'
= render Procedure::FixedFooterComponent.new(procedure: @procedure)

View file

@ -1,10 +1,10 @@
= render partial: 'administrateurs/breadcrumbs',
locals: { steps: [['Démarches', admin_procedures_path],
["#{@procedure.libelle.truncate_words(10)}", admin_procedure_path(@procedure)],
["Configuration SVA/SVR"]] }
["Silence Vaut Accord ou Rejet"]] }
.fr-container.fr-my-5w
%h1.fr-h1 Règle du Silence Vaut Accord ou Silence Vaut Rejet
%h1.fr-h2 Silence Vaut Accord ou Rejet
= render Dsfr::CalloutComponent.new(title: "Fonctionnement du SVA/SVR") do |c|
- c.with_body do
@ -40,4 +40,4 @@
= link_to("Liste des démarches encadrées par ce principe", "https://www.service-public.fr/demarches-silence-vaut-accord", class: "fr-link", title: new_tab_suffix("Rechercher les démarches avec SVA sur service-public.fr"), **external_link_attributes)
= render Procedure::SVASVRFormComponent.new(procedure: @procedure, configuration: @configuration)
= render Procedure::SVASVRFormComponent.new(procedure: @procedure, configuration: @configuration)

View file

@ -893,7 +893,6 @@ fr:
configure_api_particulier_token: "Configurer le jeton API particulier"
jeton_particulier:
show:
configure_token: "Configurer le jeton API Particulier"
api_particulier_description_html: "%{app_name} utilise <a href=\"https://api.gouv.fr/les-api/api-particulier\">API Particulier</a> qui permet daccéder aux données familiales (CAF), aux données fiscales (DGFiP), au statut pôle-emploi et au statut étudiant dun citoyen.<br />Renseignez ici le <a href=\"https://api.gouv.fr/les-api/api-particulier/demande-acces\">jeton API Particulier</a> propre à votre démarche."
token_description: "Il doit contenir au minimum 15 caractères."
update:

View file

@ -6,9 +6,7 @@ en:
show: Show breadcrumb
preview: "Preview the form"
preview_annotations: "Preview annotations"
continue: "Validate form"
continue_annotations: "Validate annotations"
continue_title: "You can comeback using this link"
since: "since %{date}"
closed: "Closed"
published: "Published"

View file

@ -6,9 +6,7 @@ fr:
show: "Voir le fil dAriane"
preview: "Prévisualiser le formulaire"
preview_annotations: "Prévisualiser les annotations"
continue: "Valider le formulaire"
continue_annotations: "Valider les annotations"
continue_title: "Vous pourrez revenir ici par la suite"
since: "depuis le %{date}"
closed: "Close"
published: "Publiée"

View file

@ -977,7 +977,7 @@ describe Administrateurs::ProceduresController, type: :controller do
end
it { expect(flash[:notice]).to be_present }
it { expect(response.body).to include "MonAvis" }
it { expect(response).to redirect_to(admin_procedure_path(procedure.id)) }
end
context 'when the embed code is not valid' do

View file

@ -14,7 +14,7 @@ describe 'Administrateurs can manage administrateurs', js: true do
scenario 'card is clickable' do
visit admin_procedure_path(procedure)
find('#administrateurs').click
expect(page).to have_css("h1", text: "Gérer les administrateurs de « #{procedure.libelle} »")
expect(page).to have_css("h1", text: "Administrateurs")
end
context 'as admin not flagged from manager' do

View file

@ -17,7 +17,7 @@ describe 'Manage procedure instructeurs', js: true do
scenario 'it works' do
visit admin_procedure_path(procedure)
find('#groupe-instructeurs').click
expect(page).to have_css("h1", text: "Gestion des instructeurs")
expect(page).to have_css("h1", text: "Instructeurs")
end
end