demarches-normaliennes/app/helpers/dossier_helper.rb

22 lines
441 B
Ruby
Raw Normal View History

module DossierHelper
def button_or_label_class(dossier)
2017-12-04 18:00:12 +01:00
if dossier.accepte?
'accepted'
elsif dossier.sans_suite?
'without-continuation'
2017-12-04 18:15:40 +01:00
elsif dossier.refuse?
'refuse'
end
end
def highlight_if_unseen_class(seen_at, updated_at)
if seen_at&.<(updated_at)
"highlighted"
end
end
def dossier_submission_is_closed?(dossier)
dossier.brouillon? && dossier.procedure.archivee?
end
end