27 lines
1.5 KiB
Text
27 lines
1.5 KiB
Text
= render partial: 'shared/dossiers/messages/message_icon', locals: { commentaire: commentaire, connected_user: connected_user }
|
|
|
|
.width-100
|
|
%h2
|
|
%span.mail
|
|
= render partial: 'shared/dossiers/messages/message_issuer', locals: { commentaire: commentaire, connected_user: connected_user }
|
|
- if commentaire_is_from_guest(commentaire)
|
|
%span.guest= t('views.shared.dossiers.messages.message.guest')
|
|
%span.date{ class: highlight_if_unseen_class(messagerie_seen_at, commentaire.created_at) }
|
|
= commentaire_date(commentaire)
|
|
.rich-text= pretty_commentaire(commentaire)
|
|
|
|
.message-extras.flex.justify-start
|
|
- if commentaire.soft_deletable?(connected_user)
|
|
- path = connected_user.is_a?(Instructeur) ? instructeur_commentaire_path(commentaire.dossier.procedure, commentaire.dossier, commentaire) : delete_commentaire_expert_avis_path(@avis.procedure, @avis, commentaire: commentaire)
|
|
= button_to path, method: :delete, class: 'button danger', data: { confirm: t('views.shared.commentaires.destroy.confirm') } do
|
|
%span.icon.delete
|
|
= t('views.shared.commentaires.destroy.button')
|
|
|
|
- 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
|
|
= t('views.shared.dossiers.messages.message.reply')
|