2017-11-17 23:40:51 +01:00
|
|
|
|
- content_for(:title, "Messagerie · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
|
|
|
|
|
|
2017-07-19 11:08:53 +02:00
|
|
|
|
= render partial: "header", locals: { dossier: @dossier }
|
|
|
|
|
|
2017-09-06 17:06:03 +02:00
|
|
|
|
.messagerie.container
|
2017-10-25 15:37:59 +02:00
|
|
|
|
%ul.messages-list
|
2017-10-05 13:43:37 +02:00
|
|
|
|
- @dossier.commentaires.each do |commentaire|
|
2017-07-19 11:08:53 +02:00
|
|
|
|
%li
|
2017-07-20 14:23:16 +02:00
|
|
|
|
= render partial: 'commentaire_icon', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
|
|
|
|
|
2017-07-24 10:01:53 +02:00
|
|
|
|
.width-100
|
2017-07-20 14:23:16 +02:00
|
|
|
|
%h2
|
|
|
|
|
%span.mail
|
|
|
|
|
= render partial: 'commentaire_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
|
|
|
|
- if ![current_gestionnaire.email, @dossier.user.email, 'contact@tps.apientreprise.fr'].include?(commentaire.email)
|
|
|
|
|
%span.guest Invité
|
2017-09-08 14:52:52 +02:00
|
|
|
|
%span.date= I18n.l(commentaire.created_at.localtime, format: '%H:%M le %d/%m/%Y')
|
2017-10-30 16:16:20 +01:00
|
|
|
|
%p.rich-text= sanitize(commentaire.body)
|
|
|
|
|
|
|
|
|
|
- if commentaire.file.present?
|
|
|
|
|
.attachment-link
|
2017-11-07 17:15:05 +01:00
|
|
|
|
= link_to commentaire.file_url, class: "button", target: "_blank", title: "Télécharger" do
|
2017-10-30 16:16:20 +01:00
|
|
|
|
.icon.attachment
|
|
|
|
|
= commentaire.file_identifier
|
|
|
|
|
- elsif commentaire.piece_justificative
|
2017-09-12 15:27:57 +02:00
|
|
|
|
.attachment-link
|
2017-10-30 16:16:20 +01:00
|
|
|
|
= link_to commentaire.piece_justificative.content_url, class: "button", target: "_blank", title: "Télécharger" do
|
2017-10-16 18:29:40 +02:00
|
|
|
|
.icon.attachment
|
2017-10-30 16:16:20 +01:00
|
|
|
|
= commentaire.piece_justificative.original_filename
|
2017-07-19 14:04:49 +02:00
|
|
|
|
|
2017-10-30 17:21:05 +01:00
|
|
|
|
= form_for(@commentaire, url: commentaire_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' }) do |f|
|
2017-07-24 09:53:43 +02:00
|
|
|
|
= f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true
|
2017-10-31 16:22:27 +01:00
|
|
|
|
.flex.justify-between
|
|
|
|
|
%div
|
|
|
|
|
= f.file_field :file, id: :file, accept: @commentaire.file.accept_extension_list
|
|
|
|
|
%label{ for: :file }
|
|
|
|
|
.notice
|
|
|
|
|
(taille max : 20 Mo)
|
|
|
|
|
|
|
|
|
|
.send-wrapper
|
|
|
|
|
= f.submit 'Envoyer', class: 'button send', data: { disable_with: "Envoi…" }
|