demarches-normaliennes/app/views/layouts/_account_dropdown.haml
2021-03-18 11:27:51 +01:00

43 lines
2 KiB
Text

.dropdown.header-menu-opener
%button.button.dropdown-button.icon-only.header-menu-button{ title: "Mon compte", 'aria-expanded' => 'false', 'aria-controls' => 'mon_compte_menu' }
.hidden Mon compte
= image_tag "icons/account-circle.svg", alt: 'Mon compte'
%ul.header-menu.dropdown-content#mon_compte_menu
%li
.menu-item{ title: current_email }
= current_email
- if super_admin_signed_in?
%li
= link_to manager_root_path, class: "menu-item menu-link" do
= image_tag "icons/super-admin.svg", alt: ''
= t('go_superadmin', scope: [:layouts])
- if multiple_devise_profile_connect?
- if user_signed_in? && nav_bar_profile != :user
%li
= link_to dossiers_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg", alt: ''
= t('go_user', scope: [:layouts])
- if instructeur_signed_in? && nav_bar_profile != :instructeur
%li
= link_to instructeur_procedures_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg", alt: ''
= t('go_instructor', scope: [:layouts])
- if expert_signed_in? && nav_bar_profile != :expert
%li
= link_to expert_all_avis_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg", alt: ''
= t('go_expert', scope: [:layouts])
- if administrateur_signed_in? && nav_bar_profile != :administrateur
%li
= link_to admin_procedures_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg", alt: ''
= t('go_admin', scope: [:layouts])
%li
= link_to profil_path, class: "menu-item menu-link" do
= image_tag "icons/switch-profile.svg", alt: ''
= t('profile', scope: [:layouts])
%li
= link_to destroy_user_session_path, method: :delete, class: "menu-item menu-link" do
= image_tag "icons/sign-out.svg", alt: ''
= t('logout', scope: [:layouts])