demarches-normaliennes/app/views/shared/dossiers/_messagerie.html.haml
Nicolas Bouilleaud bd47bf2691 Disable Messagerie in archived Dossiers and procedures
* Use the existing Dossier#messagerie_available? method
* Raise when attempting to build a Commentaire if not messagerie_available?
* Disable the Messagerie form if not messagerie_available?
* Add tests :)
* Tweak the Horaires formatting while we’re here.
2019-07-01 09:39:39 +02:00

10 lines
616 B
Text

.messagerie.container
%ul.messages-list
- dossier.commentaires.each do |commentaire|
%li.message{ class: commentaire_is_from_me_class(commentaire, connected_user) }
= render partial: "shared/dossiers/messages/message", locals: { commentaire: commentaire, connected_user: connected_user, messagerie_seen_at: messagerie_seen_at }
- if dossier.archived?
= render partial: "shared/dossiers/messages/messagerie_disabled", locals: { service: dossier.procedure.service }
- else
= render partial: "shared/dossiers/messages/form", locals: { commentaire: new_commentaire, form_url: form_url }