[Fix #1577] logo link in navbar on gestionnaire UI should not link to admin UI
This commit is contained in:
parent
3c9c67c883
commit
9f6d6e61fb
3 changed files with 36 additions and 1 deletions
|
@ -19,4 +19,15 @@ module ApplicationHelper
|
|||
current_gestionnaire.try(:email) ||
|
||||
current_administrateur.try(:email)
|
||||
end
|
||||
|
||||
def root_path_for_profile(nav_bar_profile)
|
||||
case nav_bar_profile
|
||||
when :gestionnaire
|
||||
gestionnaire_procedures_path
|
||||
when :user
|
||||
users_dossiers_path
|
||||
else
|
||||
root_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
.header-inner-content
|
||||
|
||||
.flex.align-center
|
||||
= link_to root_path, class: "header-logo" do
|
||||
= link_to root_path_for_profile(nav_bar_profile), class: "header-logo" do
|
||||
%img{ src: image_url("header/logo-ds.svg"), alt: "Logo de demarches-simplifiees.fr" }
|
||||
|
||||
- if nav_bar_profile == :gestionnaire && gestionnaire_signed_in?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue