commit
bab4b4711a
7 changed files with 8 additions and 8 deletions
|
@ -53,7 +53,7 @@
|
||||||
margin-top: $default-spacer;
|
margin-top: $default-spacer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.commentaire-textarea {
|
.message-textarea {
|
||||||
margin-bottom: $default-spacer;
|
margin-bottom: $default-spacer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
%ul.messages-list
|
%ul.messages-list
|
||||||
- dossier.commentaires.each do |commentaire|
|
- dossier.commentaires.each do |commentaire|
|
||||||
%li{ class: commentaire_is_from_me_class(commentaire, current_gestionnaire.email) }
|
%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|
|
= 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
|
.flex.justify-between
|
||||||
%div
|
%div
|
||||||
= f.file_field :file, id: :file, accept: commentaire.file.accept_extension_list
|
= 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
|
.width-100
|
||||||
%h2
|
%h2
|
||||||
%span.mail
|
%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)
|
- if ![current_gestionnaire.email, commentaire.dossier.user.email, 'contact@tps.apientreprise.fr'].include?(commentaire.email)
|
||||||
%span.guest Invité
|
%span.guest Invité
|
||||||
%span.date{ class: highlight_if_unseen_class(messagerie_seen_at, commentaire.created_at) }
|
%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 }
|
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(:dossier) { create(:dossier) }
|
||||||
let(:commentaire) { create(:commentaire, dossier: dossier) }
|
let(:commentaire) { create(:commentaire, dossier: dossier) }
|
Loading…
Add table
Reference in a new issue