diff --git a/app/assets/stylesheets/left_pannel.scss b/app/assets/stylesheets/left_pannel.scss index 99f9bb328..4011ee55a 100644 --- a/app/assets/stylesheets/left_pannel.scss +++ b/app/assets/stylesheets/left_pannel.scss @@ -126,6 +126,9 @@ font-size: 12px; text-align: left; } + .type-notif { + font-size: 16px; + } } } .notifications { @@ -137,10 +140,8 @@ } .type-notif { font-size: 16px; - float: left; + float: right; width: 30px; - height: 50px; - margin: 10px 0 0 0; } .notification { margin: 10px 0 10px 10px; diff --git a/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_index.html.haml b/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_index.html.haml index 00dce4f8b..0f4c5afb3 100644 --- a/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_index.html.haml +++ b/app/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_index.html.haml @@ -37,4 +37,5 @@ .notification .dossier= notification.decorate.index_display[:dossier] .updated-at= notification.decorate.index_display[:date] + = render partial: "layouts/left_panels/type_notif_fa", locals: {notification: notification} .type= notification.decorate.index_display[:type] 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 e29ed9332..247e19acf 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 @@ -37,22 +37,17 @@ - @facade.last_notifications.each do |notification| .notification .updated-at= notification.updated_at.strftime('%d/%m/%Y %H:%M') + = render partial: "layouts/left_panels/type_notif_fa", locals: {notification: notification} - if ['champs'].include?(notification.type_notif) - .type-notif.fa.fa-list-alt - 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) - .type-notif.fa.fa-chain - 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 - - if notification.type_notif == "commentaire" - .type-notif.fa.fa-comments-o - - elsif notification.type_notif == "submited" - .type-notif.fa.fa-thumbs-o-up .type= notification.liste.last .split-hr diff --git a/app/views/layouts/left_panels/_type_notif_fa.html.haml b/app/views/layouts/left_panels/_type_notif_fa.html.haml new file mode 100644 index 000000000..f081b230b --- /dev/null +++ b/app/views/layouts/left_panels/_type_notif_fa.html.haml @@ -0,0 +1,9 @@ +- case notification.type_notif +- when "commentaire" + .type-notif.fa.fa-comments-o +- when "submited" + .type-notif.fa.fa-thumbs-o-up +- when "champs" + .type-notif.fa.fa-list-alt +- when "piece_justificative" + .type-notif.fa.fa-chain