Properly style the label when there is no motivation nor attestation
This commit is contained in:
parent
e3ce5115a2
commit
5c92989fc8
2 changed files with 12 additions and 1 deletions
11
app/helpers/dossier_helper.rb
Normal file
11
app/helpers/dossier_helper.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
module DossierHelper
|
||||
def label_class(dossier)
|
||||
if dossier.closed?
|
||||
'accepted'
|
||||
elsif dossier.without_continuation?
|
||||
'without-continuation'
|
||||
elsif dossier.refused?
|
||||
'refused'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -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? ? 'accepted' : nil }
|
||||
%span.label{ class: label_class(dossier) }
|
||||
= dossier.statut
|
||||
|
|
Loading…
Reference in a new issue