Merge pull request #993 from sgmap/accompagnateur-header-fixes

Accompagnateur header fixes
This commit is contained in:
gregoirenovel 2017-11-28 15:21:53 +01:00 committed by GitHub
commit 6f753a45c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 7 deletions

View file

@ -44,7 +44,7 @@
}
}
&.success {
&.accepted {
color: #FFFFFF;
border-color: $green;
background-color: $green;
@ -55,6 +55,28 @@
}
}
&.without-continuation {
color: #FFFFFF;
border-color: $black;
background-color: $black;
&:hover {
color: $black;
background-color: #FFFFFF;
}
}
&.refused {
color: #FFFFFF;
border-color: $dark-red;
background-color: $dark-red;
&:hover {
color: $dark-red;
background-color: #FFFFFF;
}
}
&.large {
font-size: 18px;
line-height: 26px;

View file

@ -23,7 +23,7 @@
border: 1px solid $black;
}
&.success {
&.accepted {
background-color: $green;
}

View file

@ -0,0 +1,11 @@
module DossierHelper
def button_or_label_class(dossier)
if dossier.closed?
'accepted'
elsif dossier.without_continuation?
'without-continuation'
elsif dossier.refused?
'refused'
end
end
end

View file

@ -61,7 +61,7 @@
- else
- if dossier.motivation.present? || dossier.attestation.present?
%span.button.dropdown{ class: dossier.closed? ? 'success' : nil }
%span.button.dropdown{ class: button_or_label_class(dossier) }
= dossier.statut
.dropdown-content.fade-in-down.terminated
- if dossier.motivation.present?
@ -73,5 +73,5 @@
%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 }
%span.label{ class: button_or_label_class(dossier) }
= dossier.statut

View file

@ -3,7 +3,7 @@
- elsif dossier.en_construction?
%span.label.construction en construction
- elsif dossier.closed?
%span.label.success accepté
%span.label.accepted accepté
- elsif dossier.refused?
%span.label.refused refusé
- elsif dossier.without_continuation?

View file

@ -40,7 +40,7 @@
= link_to ".button.secondary", "#", class: "button secondary"
= link_to ".button.success", "#", class: "button success"
= link_to ".button.accepted", "#", class: "button accepted"
= link_to ".button.large", "#", class: "button large"
@ -67,7 +67,7 @@
%span.label .label
%span.label.instruction .label.instruction
%span.label.construction .label.construction
%span.label.success .label.success
%span.label.accepted .label.accepted
%span.label.refused .label.refused
%span.label.without-continuation .label.without-continuation