feat(message): replace message partial with MessageComponent
This commit is contained in:
parent
91879b89ce
commit
d2ab8b5593
22 changed files with 182 additions and 131 deletions
|
@ -1,26 +0,0 @@
|
|||
= 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('.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)
|
||||
= 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 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('.reply')
|
|
@ -1,7 +0,0 @@
|
|||
- if commentaire.sent_by_system?
|
||||
= image_tag('icons/mail.svg', class: 'person-icon', alt: '')
|
||||
- elsif commentaire.sent_by?(connected_user)
|
||||
= image_tag('icons/account-circle.svg', class: 'person-icon', alt: '')
|
||||
- else
|
||||
= image_tag('icons/blue-person.svg', class: 'person-icon', alt: '')
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
- if commentaire.sent_by_system?
|
||||
= t('views.shared.dossiers.messages.message_issuer.automatic_email')
|
||||
- elsif commentaire.sent_by?(connected_user)
|
||||
= t('views.shared.dossiers.messages.message_issuer.you')
|
||||
- else
|
||||
= commentaire.redacted_email
|
Loading…
Add table
Add a link
Reference in a new issue