Add switch button if devise account have user and gestionnaire role.
This commit is contained in:
parent
3899991baf
commit
ef5a005b35
3 changed files with 24 additions and 0 deletions
6
app/assets/stylesheets/switch_menu.scss
Normal file
6
app/assets/stylesheets/switch_menu.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
#switch_menu{
|
||||
position: fixed;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
z-index: 300;
|
||||
}
|
15
app/views/layouts/_switch_devise_profile_module.html.haml
Normal file
15
app/views/layouts/_switch_devise_profile_module.html.haml
Normal 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
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue