demarches-normaliennes/app/components/dossiers/message_component/message_component.html.haml
2022-05-17 16:08:47 +02:00

26 lines
1 KiB
Text

= image_tag(icon_path, class: 'person-icon', alt: '')
.width-100
%h2
%span.mail
= commentaire_issuer
- if commentaire_from_guest?
%span.guest= t('.guest')
%span.date{ class: highlight_if_unseen_class }
= commentaire_date
.rich-text= commentaire_body
.message-extras.flex.justify-start
- if commentaire.soft_deletable?(connected_user)
= 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
%span.icon.delete
= t('.delete_button')
- if commentaire.piece_jointe.attached?
.attachment-link
= render Attachment::ShowComponent.new(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('.reply')