diff --git a/app/assets/stylesheets/left_pannel.scss b/app/assets/stylesheets/left_pannel.scss index 99f9bb328..b528b99bb 100644 --- a/app/assets/stylesheets/left_pannel.scss +++ b/app/assets/stylesheets/left_pannel.scss @@ -49,6 +49,27 @@ border: none; width: 100%; } + .close-dossier, .refuse-dossier, .forget-dossier { + border: 1px solid #FFFFFF; + border-radius: 25px; + margin: 5px; + margin-left: auto; + margin-right: auto; + width: 60px; + } + .close-dossier:hover, .refuse-dossier:hover, .forget-dossier:hover { + color: #000000; + border-color: #000000; + } + .close-dossier { + background-color: #2A9E2A; + } + .refuse-dossier { + background-color: #E4594F; + } + .forget-dossier { + background-color: #FF8300; + } } #menu-block { #switch-buttons { @@ -126,6 +147,9 @@ font-size: 12px; text-align: left; } + .type-notif { + font-size: 16px; + } } } .notifications { @@ -137,10 +161,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..ed3effe90 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 @@ -14,14 +14,14 @@ = 'Accuser réception'.upcase - elsif @facade.dossier.received? = form_tag(url_for({controller: 'backoffice/dossiers', action: :close, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Accepter') do - %button.action + %button.action.close-dossier %i.fa.fa-check - = form_tag(url_for({controller: 'backoffice/dossiers', action: :refuse, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Refuser') do - %button.action - %i.fa.fa-times = form_tag(url_for({controller: 'backoffice/dossiers', action: :without_continuation, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Classer sans suite') do - %button.action + %button.action.forget-dossier %i.fa.fa-circle-o + = form_tag(url_for({controller: 'backoffice/dossiers', action: :refuse, dossier_id: @facade.dossier.id}), class: 'form-inline action_button', method: 'POST', style: 'display:inline', 'data-toggle' => :tooltip, title: 'Refuser') do + %button.action.refuse-dossier + %i.fa.fa-times %div#menu-block @@ -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 diff --git a/spec/features/users/invitation_spec.rb b/spec/features/users/invitation_spec.rb index 7611e6b07..0ae2f9bb5 100644 --- a/spec/features/users/invitation_spec.rb +++ b/spec/features/users/invitation_spec.rb @@ -17,7 +17,6 @@ feature 'As a User I can send invitations from dossiers', js: true do page.find('#invitations').click fill_in 'invitation-email', with: 'toto@email.com' page.find('#send-invitation .btn-success').trigger('click') - save_and_open_page end end