2021-07-22 14:32:34 +02:00
|
|
|
|
- content_for(:title, "Contacter les usagers pour #{@procedure.libelle}")
|
|
|
|
|
|
2024-10-31 14:28:14 +01:00
|
|
|
|
.sub-header
|
|
|
|
|
.fr-container.flex
|
|
|
|
|
= render partial: 'instructeurs/procedures/header',
|
|
|
|
|
locals: { procedure: @procedure }
|
|
|
|
|
|
2023-07-13 17:58:11 +02:00
|
|
|
|
.messagerie.fr-container
|
2024-10-31 14:28:14 +01:00
|
|
|
|
%h1= t('instructeurs.dossiers.header.banner.contact_users')
|
2023-07-13 17:58:11 +02:00
|
|
|
|
%p.fr-highlight
|
|
|
|
|
= t('.hint', count: @dossiers_without_groupe_count).html_safe
|
2022-04-21 10:20:14 +02:00
|
|
|
|
|
2023-07-13 17:58:11 +02:00
|
|
|
|
- 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|
|
2021-08-02 11:20:29 +02:00
|
|
|
|
|
2023-07-13 17:58:11 +02:00
|
|
|
|
%p.mandatory-explanation= t('asterisk_html', scope: [:utils])
|
2021-08-02 11:20:29 +02:00
|
|
|
|
|
2023-07-13 17:58:11 +02:00
|
|
|
|
= 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 }
|
2021-07-26 16:06:09 +02:00
|
|
|
|
- else
|
|
|
|
|
.page-title.center
|
2023-07-13 17:58:11 +02:00
|
|
|
|
%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
|
2024-02-27 18:02:26 +01:00
|
|
|
|
%span.date a envoyé ce message à #{@dossiers_without_groupe_count} usagers le #{message.sent_at.strftime('%d/%m/%y à %H:%M')}
|
2023-07-13 17:58:11 +02:00
|
|
|
|
%p= message.body
|