36 lines
1.5 KiB
Text
36 lines
1.5 KiB
Text
= icon
|
|
|
|
.width-100
|
|
%h2.fr-h6
|
|
%span.mail
|
|
= commentaire_issuer
|
|
- if commentaire_from_guest?
|
|
%span.fr-text--xs.fr-text-mention--grey.font-weight-normal= t('.guest')
|
|
|
|
= correction_badge
|
|
|
|
%span.date{ class: ["fr-text--xs", "fr-text-mention--grey", "font-weight-normal", highlight_if_unseen_class], data: scroll_to_target }
|
|
= commentaire_date
|
|
.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, allow_autolink: groupe_gestionnaire.nil? && commentaire.sent_by_instructeur?)
|
|
|
|
|
|
.message-extras.flex.justify-start
|
|
- if soft_deletable?
|
|
= 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
|
|
= delete_button_text
|
|
|
|
- if groupe_gestionnaire.nil? && commentaire.piece_jointe.attached?
|
|
.fr-ml-2w
|
|
- commentaire.piece_jointe.each do |attachment|
|
|
= render Attachment::ShowComponent.new(attachment: attachment, new_tab: true)
|
|
|
|
|
|
- if show_reply_button?
|
|
= 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
|
|
= t('.reply')
|