diff --git a/app/assets/stylesheets/new_design/buttons.scss b/app/assets/stylesheets/new_design/buttons.scss index 0f991fb24..6c9874b33 100644 --- a/app/assets/stylesheets/new_design/buttons.scss +++ b/app/assets/stylesheets/new_design/buttons.scss @@ -44,6 +44,17 @@ } } + &.success { + color: #FFFFFF; + border-color: $green; + background-color: $green; + + &:hover { + color: $green; + background-color: #FFFFFF; + } + } + &.large { font-size: 18px; line-height: 26px; @@ -91,6 +102,26 @@ right: 0; top: 5 * $default-spacer; cursor: default; + z-index: 10; + + &.terminated { + width: 600px; + color: $black; + padding: $default-padding; + + h4 { + font-size: 24px; + } + + .dossier-motivation { + margin-top: 2 * $default-padding; + } + + .attestation { + margin: $default-padding 0; + color: $grey; + } + } } .dropdown-items { diff --git a/app/views/new_gestionnaire/dossiers/_state_button.html.haml b/app/views/new_gestionnaire/dossiers/_state_button.html.haml index 402766709..7584cd95d 100644 --- a/app/views/new_gestionnaire/dossiers/_state_button.html.haml +++ b/app/views/new_gestionnaire/dossiers/_state_button.html.haml @@ -59,9 +59,25 @@ %span.button{ onclick: "TPS.motivationCancel();" } Annuler = button_tag "Valider la décision", name: :process_action, value: "close", class: 'button primary', title: 'Accepter', data: { confirm: "Accepter ce dossier ?" } -- elsif dossier.closed? - %span.label.closed Accepté -- elsif dossier.refused? - %span.label.refused Refusé -- elsif dossier.without_continuation? - %span.label.without-continuation Sans suite +- else + %span.button.dropdown{ class: dossier.closed? ? 'success' : nil } + - if dossier.closed? + accepté + - elsif dossier.without_continuation? + classé sans suite + - elsif dossier.refused? + refusé + .dropdown-content.fade-in-down.terminated + %h4 + - if dossier.closed? + Dossier nº #{dossier.id} accepté + - elsif dossier.without_continuation? + Dossier nº #{dossier.id} classé sans suite + - elsif dossier.refused? + Dossier nº #{dossier.id} refusé + + %p.dossier-motivation= dossier.motivation.present? ? dossier.motivation : "aucune motivation n'a été fournie" + + - if dossier.attestation.present? + %p.attestation L'acceptation du dossier a envoyé automatiquement une attestation au demandeur + = link_to "Voir l'attestation", attestation_dossier_path(dossier.procedure, dossier), target: '_blank', class: 'button' diff --git a/app/views/root/patron.html.haml b/app/views/root/patron.html.haml index cd02e6caf..38c478083 100644 --- a/app/views/root/patron.html.haml +++ b/app/views/root/patron.html.haml @@ -39,6 +39,8 @@ = link_to ".button.secondary", "#", class: "button secondary" + = link_to ".button.success", "#", class: "button success" + = link_to ".button.large", "#", class: "button large" = link_to ".button.large.primary", "#", class: "button large primary"