Merge pull request #5215 from betagouv/better-alt-main-title
#5162 - Amélioration des libellés vers l'accueil
This commit is contained in:
commit
123646c88a
3 changed files with 16 additions and 2 deletions
|
@ -26,6 +26,7 @@ $header-mobile-breakpoint: 550px;
|
|||
.header-logo {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
margin-right: 10px;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
- if params[:controller] == 'users/commencer'
|
||||
= link_to 'Revenir en arrière', url_for(:back), class: "button", title: "Revenir sur le site de mon administration"
|
||||
- else
|
||||
= link_to root_path_for_profile(nav_bar_profile), class: 'header-logo justify-center', title: "Aller à la page d'accueil de demarches-simplifiees.fr" do
|
||||
- root_profile_link, root_profile_libelle = root_path_info_for_profile(nav_bar_profile)
|
||||
= link_to root_profile_link, class: 'header-logo justify-center', title: root_profile_libelle do
|
||||
= image_tag 'marianne.svg', alt: 'Liberté, égalité, fraternité', width: '65px'
|
||||
= link_to root_path_for_profile(nav_bar_profile), class: 'header-logo justify-center', title: "Aller à la page d'accueil de demarches-simplifiees.fr" do
|
||||
%span.big.site-title> demarches-simplifiees.fr
|
||||
%span.small.site-title> d-s.fr
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue