cd88d054fc
i18n this mistake, re-use UX wording, add breadcrumb down to Instructeurs::Dossiers#show
42 lines
2 KiB
Text
42 lines
2 KiB
Text
- content_for(:title, "Contacter les usagers pour #{@procedure.libelle}")
|
||
|
||
.sub-header
|
||
.fr-container.flex.column
|
||
= render partial: 'instructeurs/breadcrumbs',
|
||
locals: { steps: [[t('show_procedure', scope: [:layouts, :breadcrumb], libelle: @procedure.libelle.truncate(22)), instructeur_procedure_path(@procedure)],
|
||
[t('instructeurs.dossiers.header.banner.contact_users')]] }
|
||
= render partial: 'instructeurs/procedures/header',
|
||
locals: { procedure: @procedure }
|
||
|
||
.messagerie.fr-container
|
||
%h1.fr-h4= t('instructeurs.dossiers.header.banner.contact_users')
|
||
%p.fr-highlight
|
||
= t('.hint', count: @dossiers_without_groupe_count).html_safe
|
||
|
||
- if @dossiers_without_groupe_count.positive?
|
||
= form_for(@bulk_message, url: create_multiple_commentaire_instructeur_procedure_path, html: { data: { controller: 'persisted-form', persisted_form_key_value: dom_id(@procedure, :bulk_message) } }) do |f|
|
||
|
||
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
|
||
|
||
= render Dsfr::InputComponent.new(form: f, attribute: :body, input_type: :text_area, opts: { rows: 5, placeholder: t('views.shared.dossiers.messages.form.write_message_placeholder'), title: t('views.shared.dossiers.messages.form.write_message_placeholder'), class: 'fr-input message-textarea'})
|
||
|
||
.fr-mt-3w
|
||
= f.submit t('views.shared.dossiers.messages.form.send_message'), class: 'fr-btn', data: { disable: true }
|
||
- else
|
||
.page-title.center
|
||
%h2 Il n’y a aucun dossier en brouillon
|
||
|
||
- if @bulk_messages.present?
|
||
%section.list-avis.mt-8
|
||
%h1.tab-title
|
||
Messages envoyés précédemment
|
||
%span.fr-badge= @bulk_messages.count
|
||
|
||
%ul
|
||
- @bulk_messages.each do |message|
|
||
%li.one-avis.flex.align-start
|
||
.width-100
|
||
%h2.claimant
|
||
%span.email= message.instructeur.email
|
||
%span.date a envoyé ce message à #{@dossiers_without_groupe_count} usagers le #{message.sent_at.strftime('%d/%m/%y à %H:%M')}
|
||
%p= message.body
|