demarches-normaliennes/app/helpers/dossier_helper.rb
2018-05-30 18:01:36 +02:00

25 lines
700 B
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module DossierHelper
def button_or_label_class(dossier)
if dossier.accepte?
'accepted'
elsif dossier.sans_suite?
'without-continuation'
elsif dossier.refuse?
'refuse'
end
end
def highlight_if_unseen_class(seen_at, updated_at)
if seen_at&.<(updated_at)
"highlighted"
end
end
def delete_dossier_confirm(dossier)
message = "Vous vous apprêtez à supprimer votre dossier ainsi que les informations quil contient. "
if dossier.en_construction_ou_instruction?
message += "Nous vous rappelons que toute suppression entraine lannulation de la démarche en cours. "
end
message += "Confirmer la suppression ?"
end
end