2023-11-28 14:45:15 +01:00
|
|
|
= icon
|
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?
|
2023-12-07 15:41:50 +01:00
|
|
|
%p= "(#{t('.deleted_body')})"
|
2023-02-22 11:10:09 +01:00
|
|
|
- elsif commentaire.sent_by_system?
|
|
|
|
= sanitize(commentaire.body, scrubber: Sanitizers::MailScrubber.new)
|
|
|
|
- else
|
2023-12-10 18:25:58 +01:00
|
|
|
= render SimpleFormatComponent.new(commentaire.body, allow_a: false, allow_autolink: groupe_gestionnaire.nil? && commentaire.sent_by_instructeur?)
|
2023-02-22 11:10:09 +01:00
|
|
|
|
2017-11-28 11:37:42 +01:00
|
|
|
|
2019-07-16 12:11:24 +02:00
|
|
|
.message-extras.flex.justify-start
|
2023-12-07 15:41:50 +01:00
|
|
|
- if soft_deletable?
|
2023-12-10 18:25:58 +01:00
|
|
|
= button_to delete_url, method: :delete, class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-icon-delete-line fr-btn--icon-left fr-text-default--warning', form: { data: { turbo: true, turbo_confirm: t('.confirm') } } do
|
2023-12-07 15:41:50 +01:00
|
|
|
= delete_button_text
|
2021-11-15 13:53:32 +01:00
|
|
|
|
2023-12-10 18:25:58 +01:00
|
|
|
- if groupe_gestionnaire.nil? && commentaire.piece_jointe.attached?
|
2022-11-17 19:18:58 +01:00
|
|
|
.fr-ml-2w
|
2024-02-13 08:04:27 +01:00
|
|
|
- commentaire.piece_jointe.each do |attachment|
|
|
|
|
= render Attachment::ShowComponent.new(attachment: attachment, new_tab: true)
|
|
|
|
|
2019-07-16 12:11:24 +02:00
|
|
|
|
2022-04-25 12:41:01 +02:00
|
|
|
- if show_reply_button?
|
2023-12-04 14:47:05 +01:00
|
|
|
= button_tag type: 'button', class: 'fr-btn fr-btn--sm fr-btn--secondary fr-icon-arrow-go-back-line fr-btn--icon-left', onclick: 'document.querySelector("#commentaire_body").focus()' do
|
2022-04-19 09:40:59 +02:00
|
|
|
= t('.reply')
|