2022-04-25 12:41:01 +02:00
|
|
|
= image_tag(icon_path, class: 'person-icon', alt: '')
|
2017-11-28 11:37:42 +01:00
|
|
|
|
|
|
|
.width-100
|
2022-10-06 14:25:54 +02:00
|
|
|
%h2.fr-h6
|
2017-11-28 11:37:42 +01:00
|
|
|
%span.mail
|
2022-04-25 12:41:01 +02:00
|
|
|
= commentaire_issuer
|
|
|
|
- if commentaire_from_guest?
|
2022-10-06 14:25:54 +02:00
|
|
|
%span.fr-text--xs.fr-text-mention--grey.font-weight-normal= t('.guest')
|
2023-06-02 15:46:23 +02:00
|
|
|
|
|
|
|
= correction_badge
|
|
|
|
|
2022-10-06 14:25:54 +02:00
|
|
|
%span.date{ class: ["fr-text--xs", "fr-text-mention--grey", "font-weight-normal", highlight_if_unseen_class], data: scroll_to_target }
|
2022-04-25 12:41:01 +02:00
|
|
|
= commentaire_date
|
2023-02-22 11:10:09 +01:00
|
|
|
.rich-text
|
|
|
|
- if commentaire.discarded?
|
|
|
|
%p= t('.deleted_body')
|
|
|
|
- elsif commentaire.sent_by_system?
|
|
|
|
= sanitize(commentaire.body, scrubber: Sanitizers::MailScrubber.new)
|
|
|
|
- else
|
|
|
|
= render SimpleFormatComponent.new(commentaire.body, allow_a: false)
|
|
|
|
|
2017-11-28 11:37:42 +01:00
|
|
|
|
2019-07-16 12:11:24 +02:00
|
|
|
.message-extras.flex.justify-start
|
2021-11-15 14:55:35 +01:00
|
|
|
- if commentaire.soft_deletable?(connected_user)
|
2022-04-19 09:40:59 +02:00
|
|
|
= button_to instructeur_commentaire_path(commentaire.dossier.procedure, commentaire.dossier, commentaire), method: :delete, class: 'button danger', form: { data: { turbo: true, turbo_confirm: t('.confirm') } } do
|
2021-11-15 14:15:05 +01:00
|
|
|
%span.icon.delete
|
2022-04-19 09:40:59 +02:00
|
|
|
= t('.delete_button')
|
2021-11-15 13:53:32 +01:00
|
|
|
|
2019-07-16 12:11:24 +02:00
|
|
|
- if commentaire.piece_jointe.attached?
|
2022-11-17 19:18:58 +01:00
|
|
|
.fr-ml-2w
|
2022-12-06 16:44:24 +01:00
|
|
|
= render Attachment::ShowComponent.new(attachment: commentaire.piece_jointe.attachment, new_tab: true)
|
2019-07-16 12:11:24 +02:00
|
|
|
|
2022-04-25 12:41:01 +02:00
|
|
|
- if show_reply_button?
|
2019-07-16 12:11:24 +02:00
|
|
|
= button_tag type: 'button', class: 'button small message-answer-button', onclick: 'document.querySelector("#commentaire_body").focus()' do
|
|
|
|
%span.icon.reply
|
2022-04-19 09:40:59 +02:00
|
|
|
= t('.reply')
|