Add profile switcher in header
This commit is contained in:
parent
5d8c798369
commit
dc4decc827
3 changed files with 19 additions and 2 deletions
1
app/assets/images/icons/switch-profile.svg
Normal file
1
app/assets/images/icons/switch-profile.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><g stroke="#4393F3" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M11.595 11.813a2.319 2.319 0 0 0 2.323-2.327 2.319 2.319 0 0 0-2.323-2.326c-1.29 0-2.33 1.04-2.33 2.326a2.324 2.324 0 0 0 2.33 2.327zm-4.508 7.288V17.63c0-1.808 2.977-2.716 4.783-2.716 1.807 0 4.782.908 4.782 2.716v1.471l-.002.433a8.953 8.953 0 0 1-4.923 1.464A8.999 8.999 0 0 1 3.56 8.22m16.843 6.18A8.998 8.998 0 0 0 6.978 4.355"/><path d="M1 9.259l2.667-1.094 1.092 2.667m17.816 2.045l-2.154 1.606-1.607-2.152"/></g><path d="M0 0h24v24H0z"/></g></svg>
|
After Width: | Height: | Size: 665 B |
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue