Layout for dossier show/index notifications fa (icon)

This commit is contained in:
JC 2017-01-02 10:51:07 +01:00
parent 4a1a23d1d7
commit c4f231d04e
4 changed files with 15 additions and 9 deletions

View file

@ -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;

View file

@ -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]

View file

@ -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

View file

@ -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