add expert in current_account and mode badge to the right
This commit is contained in:
parent
0286d2b6fb
commit
c767164e28
3 changed files with 4 additions and 3 deletions
|
@ -88,6 +88,7 @@ class ApplicationController < ActionController::Base
|
||||||
gestionnaire: current_gestionnaire,
|
gestionnaire: current_gestionnaire,
|
||||||
administrateur: current_administrateur,
|
administrateur: current_administrateur,
|
||||||
instructeur: current_instructeur,
|
instructeur: current_instructeur,
|
||||||
|
expert: current_expert,
|
||||||
user: current_user
|
user: current_user
|
||||||
}.compact
|
}.compact
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
%nav.fr-translate.fr-nav{ role: "navigation", "aria-label"=> t('menu_aria_label', scope: [:layouts]) }
|
%nav.fr-translate.fr-nav{ role: "navigation", "aria-label"=> t('menu_aria_label', scope: [:layouts]) }
|
||||||
.fr-nav__item
|
.fr-nav__item
|
||||||
%button.account-btn.fr-translate__btn.fr-btn{ "aria-controls" => "account", "aria-expanded" => "false", :title => t('my_account', scope: [:layouts]) }
|
%button.account-btn.fr-translate__btn.fr-btn{ "aria-controls" => "account", "aria-expanded" => "false", :title => t('my_account', scope: [:layouts]) }
|
||||||
%div{ class: "fr-badge fr-badge--sm fr-mr-1w #{color_by_role(nav_bar_profile)}" }
|
|
||||||
= t("layouts.#{nav_bar_profile}")
|
|
||||||
= " #{current_email}"
|
= " #{current_email}"
|
||||||
|
%div{ class: "fr-badge fr-badge--sm fr-ml-1w #{color_by_role(nav_bar_profile)}" }
|
||||||
|
= t("layouts.#{nav_bar_profile}")
|
||||||
#account.fr-collapse.fr-menu
|
#account.fr-collapse.fr-menu
|
||||||
%ul.fr-menu__list.max-content
|
%ul.fr-menu__list.max-content
|
||||||
- if multiple_devise_profile_connect?
|
- if multiple_devise_profile_connect?
|
||||||
|
|
|
@ -36,7 +36,7 @@ describe 'Inviting an expert:' do
|
||||||
visit new_user_session_path
|
visit new_user_session_path
|
||||||
sign_in_with avis.expert.email, password
|
sign_in_with avis.expert.email, password
|
||||||
|
|
||||||
expect(page).to have_content('Connecté(e).')
|
expect(page).to have_content('Vous pouvez à tout moment alterner entre vos différents profils : expert, usager.')
|
||||||
expect(page).to have_current_path(expert_all_avis_path)
|
expect(page).to have_current_path(expert_all_avis_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue