Add switch button if devise account have user and gestionnaire role.

This commit is contained in:
Xavier J 2016-12-01 18:35:51 +01:00
parent 3899991baf
commit ef5a005b35
3 changed files with 24 additions and 0 deletions

View file

@ -0,0 +1,6 @@
#switch_menu{
position: fixed;
left: 10px;
bottom: 10px;
z-index: 300;
}

View file

@ -0,0 +1,15 @@
#switch_menu.dropdown.dropup
%button.btn.btn-default.dropdown-toggle{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false}
%i.fa.fa-toggle-on
%span.caret
%ul.dropdown-menu.dropdown-menu-left
%li
= link_to(users_dossiers_path, id: :menu_item_procedure) do
%i.fa.fa-user
 
Utilisateur
%li
= link_to(backoffice_dossiers_path) do
%i.fa.fa-user
 
Accompagnateur

View file

@ -47,5 +47,8 @@
%h1
%i.fa.fa-times{style:'position: fixed; top: 10; right: 30; color: white;'}
- if user_signed_in? && gestionnaire_signed_in?
= render partial: 'layouts/switch_devise_profile_module'
= render partial: 'layouts/footer', locals: {main_container_size: main_container_size}
= render partial: 'layouts/google_analytics'