[fix #878] change motivation text and display a label if not action is possible

This commit is contained in:
Simon Lehericey 2017-11-22 17:59:47 +01:00 committed by gregoirenovel
parent e28b18d978
commit d9f44e013a
3 changed files with 21 additions and 11 deletions

View file

@ -24,3 +24,9 @@
// are ligned with those that have text // are ligned with those that have text
vertical-align: top; vertical-align: top;
} }
.mixed-buttons-bar .label {
padding: $default-spacer $default-padding;
font-size: 14px;
line-height: 20px;
}

View file

@ -127,7 +127,7 @@
} }
.dossier-motivation { .dossier-motivation {
margin-top: 2 * $default-padding; margin: $default-padding 0;
} }
.attestation { .attestation {

View file

@ -60,14 +60,18 @@
= button_tag "Valider la décision", name: :process_action, value: "close", class: 'button primary', title: 'Accepter', data: { confirm: "Accepter ce dossier ?" } = button_tag "Valider la décision", name: :process_action, value: "close", class: 'button primary', title: 'Accepter', data: { confirm: "Accepter ce dossier ?" }
- else - else
%span.button.dropdown{ class: dossier.closed? ? 'success' : nil } - if dossier.motivation.present? || dossier.attestation.present?
= dossier.statut %span.button.dropdown{ class: dossier.closed? ? 'success' : nil }
.dropdown-content.fade-in-down.terminated = dossier.statut
%h4 .dropdown-content.fade-in-down.terminated
= "Dossier nº #{dossier.id} #{dossier.statut}" - if dossier.motivation.present?
%h4 Motivation
%p.dossier-motivation= dossier.motivation
%p.dossier-motivation= dossier.motivation.present? ? dossier.motivation : "aucune motivation n'a été fournie" - if dossier.attestation.present?
%h4 Attestation
- if dossier.attestation.present? %p.attestation L'acceptation du dossier a envoyé automatiquement une attestation au demandeur
%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'
= link_to "Voir l'attestation", attestation_dossier_path(dossier.procedure, dossier), target: '_blank', class: 'button' - else
%span.label{ class: dossier.closed? ? 'success' : nil }
= dossier.statut