Commentaire -> message
This commit is contained in:
parent
52a79a2123
commit
a28bf91356
7 changed files with 8 additions and 8 deletions
|
@ -53,7 +53,7 @@
|
|||
margin-top: $default-spacer;
|
||||
}
|
||||
|
||||
.commentaire-textarea {
|
||||
.message-textarea {
|
||||
margin-bottom: $default-spacer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
%ul.messages-list
|
||||
- dossier.commentaires.each do |commentaire|
|
||||
%li{ class: commentaire_is_from_me_class(commentaire, current_gestionnaire.email) }
|
||||
= render partial: "new_gestionnaire/shared/commentaires/commentaire", locals: { commentaire: commentaire, messagerie_seen_at: messagerie_seen_at }
|
||||
= render partial: "new_gestionnaire/shared/messages/message", locals: { commentaire: commentaire, messagerie_seen_at: messagerie_seen_at }
|
||||
|
||||
= render partial: "new_gestionnaire/shared/commentaires/form", locals: { commentaire: new_commentaire, form_url: form_url }
|
||||
= render partial: "new_gestionnaire/shared/messages/form", locals: { commentaire: new_commentaire, form_url: form_url }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
= form_for(commentaire, url: form_url, html: { class: 'form' }) do |f|
|
||||
= f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true, class: 'commentaire-textarea'
|
||||
= f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true, class: 'message-textarea'
|
||||
.flex.justify-between
|
||||
%div
|
||||
= f.file_field :file, id: :file, accept: commentaire.file.accept_extension_list
|
|
@ -1,9 +1,9 @@
|
|||
= render partial: 'new_gestionnaire/shared/commentaires/commentaire_icon', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
||||
= render partial: 'new_gestionnaire/shared/messages/message_icon', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
||||
|
||||
.width-100
|
||||
%h2
|
||||
%span.mail
|
||||
= render partial: 'new_gestionnaire/shared/commentaires/commentaire_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
||||
= render partial: 'new_gestionnaire/shared/messages/message_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
|
||||
- if ![current_gestionnaire.email, commentaire.dossier.user.email, 'contact@tps.apientreprise.fr'].include?(commentaire.email)
|
||||
%span.guest Invité
|
||||
%span.date{ class: highlight_if_unseen_class(messagerie_seen_at, commentaire.created_at) }
|
|
@ -1,7 +1,7 @@
|
|||
describe 'new_gestionnaire/shared/commentaires/commentaire.html.haml', type: :view do
|
||||
describe 'new_gestionnaire/shared/messages/message.html.haml', type: :view do
|
||||
before { view.extend DossierHelper }
|
||||
|
||||
subject { render 'new_gestionnaire/shared/commentaires/commentaire.html.haml', commentaire: commentaire, messagerie_seen_at: seen_at, current_gestionnaire: current_gestionnaire }
|
||||
subject { render 'new_gestionnaire/shared/messages/message.html.haml', commentaire: commentaire, messagerie_seen_at: seen_at, current_gestionnaire: current_gestionnaire }
|
||||
|
||||
let(:dossier) { create(:dossier) }
|
||||
let(:commentaire) { create(:commentaire, dossier: dossier) }
|
Loading…
Reference in a new issue