From 3a8e84b128da2261b58bfe3ec5284b4999b78632 Mon Sep 17 00:00:00 2001 From: Simon Lehericey Date: Wed, 19 Jul 2017 11:23:31 +0200 Subject: [PATCH] NewDesign: add guest label to message --- app/assets/stylesheets/new_design/dossier_messagerie.scss | 4 ++++ app/views/new_gestionnaire/dossiers/messagerie.html.haml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/app/assets/stylesheets/new_design/dossier_messagerie.scss b/app/assets/stylesheets/new_design/dossier_messagerie.scss index 28e1aa9ac..6bf4aae51 100644 --- a/app/assets/stylesheets/new_design/dossier_messagerie.scss +++ b/app/assets/stylesheets/new_design/dossier_messagerie.scss @@ -15,9 +15,13 @@ font-weight: bold; } + .guest, .date { font-size: 12px; color: $grey; + } + + .date { float: right; } } diff --git a/app/views/new_gestionnaire/dossiers/messagerie.html.haml b/app/views/new_gestionnaire/dossiers/messagerie.html.haml index 56f59ad73..65bfc1477 100644 --- a/app/views/new_gestionnaire/dossiers/messagerie.html.haml +++ b/app/views/new_gestionnaire/dossiers/messagerie.html.haml @@ -7,5 +7,7 @@ %h2 %span.mail = render partial: 'commentaire_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire } + - if ![current_gestionnaire.email, @dossier.user.email, 'contact@tps.apientreprise.fr'].include?(commentaire.email) + %span.guest Invité %span.date= I18n.l(commentaire.created_at.localtime, format: '%d/%m/%y') %p= sanitize(commentaire.body)