2017-11-17 23:40:51 +01:00
|
|
|
|
- content_for(:title, "Messagerie · Dossier nº #{@dossier.id} (#{@dossier.owner_name})")
|
|
|
|
|
|
2017-09-06 17:06:03 +02:00
|
|
|
|
= render partial: 'header', locals: { avis: @avis, dossier: @dossier }
|
|
|
|
|
|
|
|
|
|
.messagerie.container
|
|
|
|
|
%ul
|
2017-10-05 13:43:37 +02:00
|
|
|
|
- @dossier.commentaires.each do |commentaire|
|
2017-09-06 17:06:03 +02:00
|
|
|
|
%li
|
|
|
|
|
= render partial: 'new_gestionnaire/dossiers/commentaire_icon', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
|
|
|
|
|
|
|
|
|
.width-100
|
|
|
|
|
%h2
|
|
|
|
|
%span.mail
|
|
|
|
|
= render partial: 'new_gestionnaire/dossiers/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é
|
|
|
|
|
%span.date= I18n.l(commentaire.created_at.localtime, format: '%H:%M le %d/%m/%Y')
|
|
|
|
|
%p= sanitize(commentaire.body)
|
|
|
|
|
|
|
|
|
|
= form_for(Commentaire.new, url: commentaire_avis_path(@avis), html: { class: 'form' }) do |f|
|
|
|
|
|
= f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true
|
|
|
|
|
.send-wrapper
|
|
|
|
|
= f.submit 'Envoyer', class: 'button send'
|