2018-09-11 17:32:08 +02:00
|
|
|
= render partial: 'shared/dossiers/messages/message_icon', locals: { commentaire: commentaire, connected_user: connected_user }
|
2017-11-28 11:37:42 +01:00
|
|
|
|
|
|
|
.width-100
|
|
|
|
%h2
|
|
|
|
%span.mail
|
2018-09-11 17:32:08 +02:00
|
|
|
= render partial: 'shared/dossiers/messages/message_issuer', locals: { commentaire: commentaire, connected_user: connected_user }
|
2018-09-06 16:08:24 +02:00
|
|
|
- if commentaire_is_from_guest(commentaire)
|
2021-04-17 18:49:00 +02:00
|
|
|
%span.guest= t('views.shared.dossiers.messages.message.guest')
|
2017-12-05 17:20:10 +01:00
|
|
|
%span.date{ class: highlight_if_unseen_class(messagerie_seen_at, commentaire.created_at) }
|
2018-09-06 15:04:43 +02:00
|
|
|
= commentaire_date(commentaire)
|
2020-08-10 16:02:11 +02:00
|
|
|
.rich-text= pretty_commentaire(commentaire)
|
2017-11-28 11:37:42 +01:00
|
|
|
|
2019-07-16 12:11:24 +02:00
|
|
|
.message-extras.flex.justify-start
|
2021-11-15 13:53:32 +01:00
|
|
|
- if commentaire.sent_by?(connected_user) && commentaire.sent_by_instructeur? && commentaire.deleted_at.nil?
|
2021-11-15 14:15:05 +01:00
|
|
|
= button_to instructeur_commentaire_path(commentaire.dossier.procedure, commentaire.dossier, commentaire), method: :delete, class: 'button danger', data: { confirm: t('views.shared.commentaires.destroy.confirm') } do
|
|
|
|
%span.icon.delete
|
|
|
|
= t('views.shared.commentaires.destroy.button')
|
2021-11-15 13:53:32 +01:00
|
|
|
|
2019-07-16 12:11:24 +02:00
|
|
|
- if commentaire.piece_jointe.attached?
|
|
|
|
.attachment-link
|
|
|
|
= render partial: "shared/attachment/show", locals: { attachment: commentaire.piece_jointe.attachment }
|
|
|
|
|
|
|
|
- if show_reply_button
|
|
|
|
= button_tag type: 'button', class: 'button small message-answer-button', onclick: 'document.querySelector("#commentaire_body").focus()' do
|
|
|
|
%span.icon.reply
|
2021-04-17 18:49:00 +02:00
|
|
|
= t('views.shared.dossiers.messages.message.reply')
|