Merge pull request #10002 from mfo/US/dsfrize-instructeur-invitation-page
ETQ instructeur, la page de gestion des groupes d'instructeur est au format du DSFR
This commit is contained in:
commit
4f58795eaa
4 changed files with 18 additions and 24 deletions
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
= f.submit 'Affecter', class: 'fr-btn', disabled: disabled_as_super_admin
|
= f.submit 'Affecter', class: 'fr-btn', disabled: disabled_as_super_admin
|
||||||
|
|
||||||
%table.table.mt-2
|
%table.fr-table.fr-mt-2w.width-100
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th{ colspan: 2 }= t('.assigned_instructeur', count: instructeurs.count)
|
%th{ colspan: 2 }= t('.assigned_instructeur', count: instructeurs.count)
|
||||||
|
|
|
@ -4,13 +4,11 @@
|
||||||
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
locals: { steps: [[@procedure.libelle.truncate_words(10), instructeur_procedure_path(@procedure)],
|
||||||
['Groupes d’instructeurs']] }
|
['Groupes d’instructeurs']] }
|
||||||
|
|
||||||
.container.groupe-instructeur
|
.fr-container.groupe-instructeur
|
||||||
|
%h1 Gestion des Groupes
|
||||||
.card
|
.card
|
||||||
.card-title Gestion des Groupes
|
%h2.fr-h3 Liste des groupes
|
||||||
%table.table.mt-2
|
%table.table.mt-2
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th{ colspan: 2 } Liste des groupes
|
|
||||||
%tbody
|
%tbody
|
||||||
- @groupes_instructeurs.each do |group|
|
- @groupes_instructeurs.each do |group|
|
||||||
%tr
|
%tr
|
||||||
|
|
|
@ -13,25 +13,21 @@
|
||||||
locals: { steps: [[@procedure.libelle, instructeur_procedure_path(@procedure)],
|
locals: { steps: [[@procedure.libelle, instructeur_procedure_path(@procedure)],
|
||||||
['Instructeurs']] }
|
['Instructeurs']] }
|
||||||
|
|
||||||
.container.groupe-instructeur
|
.fr-container.groupe-instructeur
|
||||||
%h1
|
%h1
|
||||||
- if @procedure.routing_enabled?
|
- if @procedure.routing_enabled?
|
||||||
Groupe « #{@groupe_instructeur.label} »
|
Groupe « #{@groupe_instructeur.label} »
|
||||||
- else
|
- else
|
||||||
Démarche « #{@procedure.libelle} »
|
Démarche « #{@procedure.libelle} »
|
||||||
|
|
||||||
.card.mt-2
|
.card.fr-mt-2w
|
||||||
.card-title Gestion des instructeurs
|
%h2.fr-h3 Gestion des instructeurs
|
||||||
= form_for :instructeur,
|
= form_for(Instructeur.new(user: User.new), url: { action: :add_instructeur }, html: { class: 'form' }) do |f|
|
||||||
url: { action: :add_instructeur },
|
%h3.fr-h4 Affecter un nouvel instructeur
|
||||||
html: { class: 'form' } do |f|
|
= render Dsfr::InputComponent.new(form: f, attribute: :email)
|
||||||
|
= f.submit 'Affecter', class: 'fr-btn fr-primary'
|
||||||
|
|
||||||
= f.label :email do
|
%table.fr-table.fr-mt-2w.width-100
|
||||||
Affecter un nouvel instructeur
|
|
||||||
= f.email_field :email, placeholder: 'marie.dupont@exemple.fr', required: true
|
|
||||||
= f.submit 'Affecter', class: 'button primary send'
|
|
||||||
|
|
||||||
%table.table.mt-2
|
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th{ colspan: 2 } Instructeurs affectés
|
%th{ colspan: 2 } Instructeurs affectés
|
||||||
|
@ -40,16 +36,17 @@
|
||||||
%tr
|
%tr
|
||||||
%td= instructeur.email
|
%td= instructeur.email
|
||||||
- confirmation_message = @procedure.routing_enabled? ? "Êtes-vous sûr de vouloir retirer l’instructeur « #{instructeur.email} » du groupe « #{@groupe_instructeur.label} » ?" : "Êtes-vous sûr de vouloir retirer l’instructeur « #{instructeur.email} » de la démarche ?"
|
- confirmation_message = @procedure.routing_enabled? ? "Êtes-vous sûr de vouloir retirer l’instructeur « #{instructeur.email} » du groupe « #{@groupe_instructeur.label} » ?" : "Êtes-vous sûr de vouloir retirer l’instructeur « #{instructeur.email} » de la démarche ?"
|
||||||
%td.actions= button_to 'retirer',
|
%td.actions= button_to 'Retirer',
|
||||||
{ action: :remove_instructeur },
|
{ action: :remove_instructeur },
|
||||||
{ method: :delete,
|
{ method: :delete,
|
||||||
data: { confirm: confirmation_message },
|
data: { confirm: confirmation_message },
|
||||||
params: { instructeur: { id: instructeur.id }},
|
params: { instructeur: { id: instructeur.id }},
|
||||||
class: 'button' }
|
class: 'fr-btn fr-btn--secondary' }
|
||||||
|
|
||||||
= paginate @instructeurs, views_prefix: 'shared'
|
= paginate @instructeurs, views_prefix: 'shared'
|
||||||
.card.mt-2
|
|
||||||
.card-title Informations de contact
|
.card.fr-mt-2w
|
||||||
|
%h2.fr-h3 Informations de contact
|
||||||
- service = @groupe_instructeur.contact_information
|
- service = @groupe_instructeur.contact_information
|
||||||
- if service.nil?
|
- if service.nil?
|
||||||
= "Le groupe #{@groupe_instructeur.label} n'a pas d'informations de contact. Les informations de contact affichées à l'usager seront celles du service de la procédure"
|
= "Le groupe #{@groupe_instructeur.label} n'a pas d'informations de contact. Les informations de contact affichées à l'usager seront celles du service de la procédure"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
.card.mt-2
|
.card.mt-2
|
||||||
|
%h2.fr-h3 Tampon de l'attestation
|
||||||
= render NestedForms::FormOwnerComponent.new
|
= render NestedForms::FormOwnerComponent.new
|
||||||
= form_with url: { action: :add_signature }, method: :post, html: { multipart: true } do |f|
|
= form_with url: { action: :add_signature }, method: :post, html: { multipart: true } do |f|
|
||||||
.card-title Tampon de l'attestation
|
|
||||||
|
|
||||||
%p.fr-text--sm.fr-text-mention--grey
|
%p.fr-text--sm.fr-text-mention--grey
|
||||||
Vous pouvez apposer sur l’attestation un tampon (ou signature) dédié à ce groupe d’instructeurs.
|
Vous pouvez apposer sur l’attestation un tampon (ou signature) dédié à ce groupe d’instructeurs.
|
||||||
Si vous n’en fournissez pas, celui de la démarche sera utilisé, le cas échéant.
|
Si vous n’en fournissez pas, celui de la démarche sera utilisé, le cas échéant.
|
||||||
|
|
Loading…
Add table
Reference in a new issue