demarches-normaliennes/app/components/account_dropdown_component/account_dropdown_component.html.haml

58 lines
2.5 KiB
Text

%nav.fr-translate.fr-nav{ role: "navigation", "aria-label" => t('.my_account') }
.fr-nav__item
%button.account-btn.fr-translate__btn.fr-btn{ "aria-controls" => "account", "aria-expanded" => "false", title: t('.my_account') }
%span.fr-mr-1w= current_email
- if france_connected?
%span  via FranceConnect
- if show_profile_badge?
%span{ class: "fr-badge fr-badge--sm #{color_by_role(nav_bar_profile)}" }
= t(nav_bar_profile, scope: :layouts)
#account.fr-collapse.fr-menu
%ul.fr-menu__list.max-content
- if multiple_devise_profile_connect?
%li
= link_to "#", class: "fr-nav__link", "aria-current" => "true" do
= t('.connected_as', profile: t(nav_bar_profile, scope: :layouts))
- if user_signed_in? && nav_bar_profile != :user
%li
= link_to dossiers_path, class: "fr-nav__link" do
%span.fr-icon-refresh-line.fr-icon--sm
= t('.go_user')
- if instructeur_signed_in? && nav_bar_profile != :instructeur
%li
= link_to instructeur_path, class: "fr-nav__link" do
%span.fr-icon-refresh-line.fr-icon--sm
= t('.go_instructor')
- if expert_signed_in? && nav_bar_profile != :expert
%li
= link_to expert_all_avis_path, class: "fr-nav__link" do
%span.fr-icon-refresh-line.fr-icon--sm
= t('.go_expert')
- if administrateur_signed_in? && nav_bar_profile != :administrateur
%li
= link_to admin_path, class: "fr-nav__link" do
%span.fr-icon-refresh-line.fr-icon--sm
= t('.go_admin')
- if gestionnaire_signed_in? && nav_bar_profile != :gestionnaire
%li
= link_to gestionnaire_groupe_gestionnaires_path, class: "fr-nav__link" do
%span.fr-icon-refresh-line.fr-icon--sm
= t('.go_gestionnaire')
- if super_admin_signed_in? && nav_bar_profile != :superadmin
%li
= link_to manager_root_path, class: "fr-nav__link" do
%span.fr-icon-shield-line.fr-icon--sm
= t('.go_superadmin')
%li
= link_to profil_path, class: "fr-nav__link" do
%span.fr-icon-user-line.fr-icon--sm
= t('.profile')
%li
= link_to destroy_user_session_path, method: :delete, class: "fr-nav__link" do
%span.fr-icon-logout-box-r-line.fr-icon--sm
= t('.logout')