demarches-normaliennes/app/views/layouts/_account_dropdown.haml

57 lines
2.7 KiB
Text
Raw Normal View History

%nav.fr-translate.fr-nav{ role: "navigation", "aria-label"=> t('my_account', scope: [:layouts]) }
.fr-nav__item
2022-09-21 11:06:19 +02:00
%button.account-btn.fr-translate__btn.fr-btn{ "aria-controls" => "account", "aria-expanded" => "false", :title => t('my_account', scope: [:layouts]) }
2024-06-20 09:57:19 +02:00
%span.fr-mr-1w= current_email
- if dossier.present? && dossier&.france_connected_with_one_identity?
%span
 via FranceConnect
2024-06-20 09:57:19 +02:00
%span{ class: "fr-badge fr-badge--sm #{color_by_role(nav_bar_profile)}" }
= t("layouts.#{nav_bar_profile}")
#account.fr-collapse.fr-menu
2023-07-13 10:38:15 +02:00
%ul.fr-menu__list.max-content
- if multiple_devise_profile_connect?
2023-07-12 16:50:28 +02:00
%li
= link_to "#", class: "fr-nav__link", "aria-current" => "true" do
2023-07-13 12:08:30 +02:00
= t('layouts.connected_as', profile: t("layouts.#{nav_bar_profile}"))
2023-07-12 16:50:28 +02:00
- if user_signed_in? && nav_bar_profile != :user
%li
2023-07-12 16:50:28 +02:00
= link_to dossiers_path, class: "fr-nav__link" do
2023-07-13 10:38:15 +02:00
%span.fr-icon-refresh-line.fr-icon--sm
= t('go_user', scope: [:layouts])
- if instructeur_signed_in? && nav_bar_profile != :instructeur
%li
2023-07-12 16:50:28 +02:00
= link_to instructeur_procedures_path, class: "fr-nav__link" do
2023-07-13 10:38:15 +02:00
%span.fr-icon-refresh-line.fr-icon--sm
= t('go_instructor', scope: [:layouts])
- if expert_signed_in? && nav_bar_profile != :expert
%li
2023-07-12 16:50:28 +02:00
= link_to expert_all_avis_path, class: "fr-nav__link" do
2023-07-13 10:38:15 +02:00
%span.fr-icon-refresh-line.fr-icon--sm
= t('go_expert', scope: [:layouts])
- if administrateur_signed_in? && nav_bar_profile != :administrateur
%li
2023-07-12 16:50:28 +02:00
= link_to admin_procedures_path, class: "fr-nav__link" do
2023-07-13 10:38:15 +02:00
%span.fr-icon-refresh-line.fr-icon--sm
= t('go_admin', scope: [:layouts])
- if gestionnaire_signed_in? && nav_bar_profile != :gestionnaire
2023-08-25 22:53:30 +02:00
%li
= link_to gestionnaire_groupe_gestionnaires_path, class: "fr-nav__link" do
2023-08-25 22:53:30 +02:00
%span.fr-icon-refresh-line.fr-icon--sm
= t('go_gestionnaire', scope: [:layouts])
- if super_admin_signed_in? && nav_bar_profile != :superadmin
2023-07-12 16:50:28 +02:00
%li
= link_to manager_root_path, class: "fr-nav__link" do
2023-07-13 10:38:15 +02:00
%span.fr-icon-shield-line.fr-icon--sm
2023-07-12 16:50:28 +02:00
= t('go_superadmin', scope: [:layouts])
%li
2023-07-12 16:50:28 +02:00
= link_to profil_path, class: "fr-nav__link" do
2023-07-13 10:38:15 +02:00
%span.fr-icon-user-line.fr-icon--sm
= t('profile', scope: [:layouts])
%li
2023-07-12 16:50:28 +02:00
= link_to destroy_user_session_path, method: :delete, class: "fr-nav__link" do
2023-07-13 10:38:15 +02:00
%span.fr-icon-logout-box-r-line.fr-icon--sm
= t('logout', scope: [:layouts])