diff --git a/app/assets/images/icons/switch-profile.svg b/app/assets/images/icons/switch-profile.svg new file mode 100644 index 000000000..e5d63c13c --- /dev/null +++ b/app/assets/images/icons/switch-profile.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/views/layouts/_new_header.haml b/app/views/layouts/_new_header.haml index 492525750..5e590e187 100644 --- a/app/views/layouts/_new_header.haml +++ b/app/views/layouts/_new_header.haml @@ -18,6 +18,24 @@ %li .menu-item{ title: current_email } = current_email + + - if SwitchDeviseProfileService.new(warden).multiple_devise_profile_connect? + - if user_signed_in? + %li + = link_to users_dossiers_path, class: "menu-item menu-link" do + = image_tag "icons/switch-profile.svg" + Passer en usager + - if gestionnaire_signed_in? + %li + = link_to backoffice_dossiers_path, class: "menu-item menu-link" do + = image_tag "icons/switch-profile.svg" + Passer en accompagnateur + - if administrateur_signed_in? + %li + = link_to admin_procedures_path, class: "menu-item menu-link" do + = image_tag "icons/switch-profile.svg" + Passer en administrateur + %li = link_to destroy_user_session_path, method: :delete, class: "menu-item menu-link" do = image_tag "icons/sign-out.svg" diff --git a/app/views/layouts/new_application.html.haml b/app/views/layouts/new_application.html.haml index 3e2196589..799b9f413 100644 --- a/app/views/layouts/new_application.html.haml +++ b/app/views/layouts/new_application.html.haml @@ -30,8 +30,6 @@ = render partial: "layouts/flash_messages" = yield - = render partial: "layouts/switch_devise_profile_module" - = render partial: "layouts/new_footer" = render partial: "layouts/google_analytics" = render partial: "layouts/mailjet_newsletter"