Properly style the button when there is a motivation or attestation
This commit is contained in:
parent
5c92989fc8
commit
10f1859a2a
3 changed files with 25 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module DossierHelper
|
||||
def label_class(dossier)
|
||||
def button_or_label_class(dossier)
|
||||
if dossier.closed?
|
||||
'accepted'
|
||||
elsif dossier.without_continuation?
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
- else
|
||||
- if dossier.motivation.present? || dossier.attestation.present?
|
||||
%span.button.dropdown{ class: dossier.closed? ? 'accepted' : 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: label_class(dossier) }
|
||||
%span.label{ class: button_or_label_class(dossier) }
|
||||
= dossier.statut
|
||||
|
|
Loading…
Reference in a new issue