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-07-19 11:08:53 +02:00
|
|
|
%ul
|
2017-07-20 14:17:12 +02:00
|
|
|
- @dossier.commentaires.ordered.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-07-20 14:23:16 +02:00
|
|
|
%p= sanitize(commentaire.body)
|
2017-09-12 15:27:57 +02:00
|
|
|
- if file = commentaire.piece_justificative
|
|
|
|
.attachment-link
|
|
|
|
= link_to file.content_url, class: "button", target: "_blank", title: "Télécharger" do
|
|
|
|
%i.attachment
|
|
|
|
= file.original_filename
|
2017-07-19 14:04:49 +02:00
|
|
|
|
|
|
|
= form_for(Commentaire.new, 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-07-26 12:41:58 +02:00
|
|
|
.send-wrapper
|
2017-09-08 15:04:31 +02:00
|
|
|
= f.submit 'Envoyer', class: 'button send', data: { disable_with: "Envoi..." }
|