New Design: add motivation and attestation

This commit is contained in:
Simon Lehericey 2017-09-14 10:36:01 +02:00 committed by Mathieu Magnin
parent 25ed44704c
commit 1962037728
3 changed files with 55 additions and 6 deletions

View file

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

View file

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

View file

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