demarches-normaliennes/app/views/new_gestionnaire/shared/messages/_message.html.haml

23 lines
1.2 KiB
Text
Raw Normal View History

2017-12-18 13:57:27 +01:00
= render partial: 'new_gestionnaire/shared/messages/message_icon', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
.width-100
%h2
%span.mail
2017-12-18 13:57:27 +01:00
= render partial: 'new_gestionnaire/shared/messages/message_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
2018-05-31 15:43:57 +02:00
- if ![current_gestionnaire.email, commentaire.dossier.user.email, OLD_CONTACT_EMAIL, CONTACT_EMAIL].include?(commentaire.email)
%span.guest Invité
%span.date{ class: highlight_if_unseen_class(messagerie_seen_at, commentaire.created_at) }
= I18n.l(commentaire.created_at.localtime, format: '%d/%m/%Y à %H:%M ')
.rich-text= sanitize(commentaire.body)
- if commentaire.piece_justificative
.attachment-link
= link_to commentaire.piece_justificative.content_url, class: "button", target: "_blank", title: "Télécharger" do
%span.icon.attachment
= commentaire.piece_justificative.original_filename
- elsif commentaire.file.present?
.attachment-link
= link_to commentaire.file_url, class: "button", target: "_blank", title: "Télécharger" do
%span.icon.attachment
= commentaire.file_identifier