2024-11-19 13:18:55 +01:00
|
|
|
%nav.fr-translate.fr-nav{ role: "navigation", "aria-label" => t('.my_account') }
|
2022-08-17 13:53:07 +02:00
|
|
|
.fr-nav__item
|
2024-11-19 13:18:55 +01:00
|
|
|
%button.account-btn.fr-translate__btn.fr-btn{ "aria-controls" => "account", "aria-expanded" => "false", title: t('.my_account') }
|
2024-06-20 09:57:19 +02:00
|
|
|
%span.fr-mr-1w= current_email
|
2024-11-19 13:18:55 +01:00
|
|
|
- if france_connected?
|
|
|
|
%span via FranceConnect
|
|
|
|
|
|
|
|
- if show_profile_badge?
|
2024-09-11 18:22:25 +02:00
|
|
|
%span{ class: "fr-badge fr-badge--sm #{color_by_role(nav_bar_profile)}" }
|
2024-11-19 13:18:55 +01:00
|
|
|
= t(nav_bar_profile, scope: :layouts)
|
|
|
|
|
2022-08-17 13:53:07 +02:00
|
|
|
#account.fr-collapse.fr-menu
|
2023-07-13 10:38:15 +02:00
|
|
|
%ul.fr-menu__list.max-content
|
2022-08-17 13:53:07 +02:00
|
|
|
- if multiple_devise_profile_connect?
|
2023-07-12 16:50:28 +02:00
|
|
|
%li
|
|
|
|
= link_to "#", class: "fr-nav__link", "aria-current" => "true" do
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.connected_as', profile: t(nav_bar_profile, scope: :layouts))
|
2023-07-12 16:50:28 +02:00
|
|
|
|
2022-08-17 13:53:07 +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
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.go_user')
|
2022-08-17 13:53:07 +02:00
|
|
|
- if instructeur_signed_in? && nav_bar_profile != :instructeur
|
|
|
|
%li
|
2024-11-19 14:50:19 +01:00
|
|
|
= link_to instructeur_path, class: "fr-nav__link" do
|
2023-07-13 10:38:15 +02:00
|
|
|
%span.fr-icon-refresh-line.fr-icon--sm
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.go_instructor')
|
2022-08-17 13:53:07 +02:00
|
|
|
- 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
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.go_expert')
|
2022-08-17 13:53:07 +02:00
|
|
|
- if administrateur_signed_in? && nav_bar_profile != :administrateur
|
|
|
|
%li
|
2024-11-19 14:50:19 +01:00
|
|
|
= link_to admin_path, class: "fr-nav__link" do
|
2023-07-13 10:38:15 +02:00
|
|
|
%span.fr-icon-refresh-line.fr-icon--sm
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.go_admin')
|
2023-09-04 12:07:04 +02:00
|
|
|
- if gestionnaire_signed_in? && nav_bar_profile != :gestionnaire
|
2023-08-25 22:53:30 +02:00
|
|
|
%li
|
2023-09-04 12:07:04 +02:00
|
|
|
= 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
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.go_gestionnaire')
|
2022-08-17 13:53:07 +02:00
|
|
|
|
2023-10-30 15:37:04 +01:00
|
|
|
- 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
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.go_superadmin')
|
2023-07-12 16:50:28 +02:00
|
|
|
|
2019-03-28 11:33:45 +01:00
|
|
|
%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
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.profile')
|
2019-03-28 11:33:45 +01:00
|
|
|
%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
|
2024-11-19 13:18:55 +01:00
|
|
|
= t('.logout')
|