Merge pull request #977 from sgmap/better_motivation_view
Better motivation view
This commit is contained in:
commit
2edcc12126
7 changed files with 34 additions and 24 deletions
|
@ -24,3 +24,9 @@
|
|||
// are ligned with those that have text
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.mixed-buttons-bar .label {
|
||||
padding: $default-spacer $default-padding;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
}
|
||||
|
||||
.dossier-motivation {
|
||||
margin-top: 2 * $default-padding;
|
||||
margin: $default-padding 0;
|
||||
}
|
||||
|
||||
.attestation {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
border: 1px solid $black;
|
||||
}
|
||||
|
||||
&.closed {
|
||||
&.success {
|
||||
background-color: $green;
|
||||
}
|
||||
|
||||
|
|
|
@ -363,6 +363,16 @@ class Dossier < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def statut
|
||||
if closed?
|
||||
'accepté'
|
||||
elsif without_continuation?
|
||||
'classé sans suite'
|
||||
elsif refused?
|
||||
'refusé'
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def build_attestation
|
||||
|
|
|
@ -60,24 +60,18 @@
|
|||
= button_tag "Valider la décision", name: :process_action, value: "close", class: 'button primary', title: 'Accepter', data: { confirm: "Accepter ce dossier ?" }
|
||||
|
||||
- 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é
|
||||
- if dossier.motivation.present? || dossier.attestation.present?
|
||||
%span.button.dropdown{ class: dossier.closed? ? 'success' : nil }
|
||||
= dossier.statut
|
||||
.dropdown-content.fade-in-down.terminated
|
||||
- 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?
|
||||
%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'
|
||||
- if dossier.attestation.present?
|
||||
%h4 Attestation
|
||||
%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'
|
||||
- else
|
||||
%span.label{ class: dossier.closed? ? 'success' : nil }
|
||||
= dossier.statut
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
- elsif dossier.en_construction?
|
||||
%span.label.construction en construction
|
||||
- elsif dossier.closed?
|
||||
%span.label.closed accepté
|
||||
%span.label.success accepté
|
||||
- elsif dossier.refused?
|
||||
%span.label.refused refusé
|
||||
- elsif dossier.without_continuation?
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
%span.label .label
|
||||
%span.label.instruction .label.instruction
|
||||
%span.label.construction .label.construction
|
||||
%span.label.closed .label.closed
|
||||
%span.label.success .label.success
|
||||
%span.label.refused .label.refused
|
||||
%span.label.without-continuation .label.without-continuation
|
||||
|
||||
|
|
Loading…
Reference in a new issue