From 97881182299d50f2bf92c9cf22086e05876ef1ff Mon Sep 17 00:00:00 2001 From: JC Date: Mon, 26 Dec 2016 17:59:08 +0100 Subject: [PATCH] Adapt listing for notifications, according champ or pieces --- ...left_panel_backoffice_dossierscontroller_show.html.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.html.haml b/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.html.haml index b424cc9d6..e3c496845 100644 --- a/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.html.haml +++ b/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.html.haml @@ -38,11 +38,16 @@ - @facade.dossier.notifications.limit(5).each do |notification| .notification .updated-at= notification.updated_at.strftime('%d/%m/%Y %H:%M') - - if ['champs', 'piece_justificative'].include?(notification.type_notif) + - if ['champs'].include?(notification.type_notif) - if notification.liste.size > 1 .type= "Plusieurs attributs ont été changés, dont: #{notification.liste.join(" ")}" - else .type= "Un attribut à été changé: #{notification.liste.last}" + - elsif ['piece_justificative'].include?(notification.type_notif) + - if notification.liste.size > 1 + .type= "Plusieurs pièces justificatives ont été changés, dont: #{notification.liste.join(" ")}" + - else + .type= "Une pièce justificative à été changée: #{notification.liste.last}" - else .type= notification.liste.last .split-hr