include the libelle with the redirection link

This commit is contained in:
clemkeirua 2020-06-03 14:55:36 +02:00 committed by Keirua (Rebase PR Action)
parent efe7773eb5
commit abe0e321ac
2 changed files with 16 additions and 2 deletions

View file

@ -122,6 +122,19 @@ module ApplicationHelper
end
end
def root_path_info_for_profile(nav_bar_profile)
case nav_bar_profile
when :administrateur
[admin_procedures_path, "Aller au panneau d'administration"]
when :instructeur
[instructeur_procedures_path, 'Aller à la liste des démarches']
when :user
[dossiers_path, 'Aller à la liste des dossiers']
else
[root_path, "Aller à la page d'accueil"]
end
end
def try_format_date(date)
date.present? ? I18n.l(date) : ''
end