From cbec49aa0f9596a77578e3fb7ede31c07ae37dbe Mon Sep 17 00:00:00 2001 From: Frederic Merizen Date: Wed, 27 Mar 2019 18:46:25 +0100 Subject: [PATCH] Revert "Revert "Redesign admin roles menu"" --- app/assets/stylesheets/switch_menu.scss | 14 ++++++- .../_switch_devise_profile_module.html.haml | 37 +++++++------------ app/views/layouts/application_old.html.haml | 2 - ...admin_procedurescontroller_index.html.haml | 1 + 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/app/assets/stylesheets/switch_menu.scss b/app/assets/stylesheets/switch_menu.scss index e9c18733c..bd8e913ea 100644 --- a/app/assets/stylesheets/switch_menu.scss +++ b/app/assets/stylesheets/switch_menu.scss @@ -1,6 +1,16 @@ #switch-menu { position: fixed; - left: 10px; bottom: 10px; - z-index: 300; + color: #FFFFFF; + list-style: none; + text-decoration: none; + padding-left: 20px; +} + +#switch-menu a, +#switch-menu a:link, +#switch-menu a:visited, +#switch-menu a:hover { + text-decoration: none; + color: #FFFFFF; } diff --git a/app/views/layouts/_switch_devise_profile_module.html.haml b/app/views/layouts/_switch_devise_profile_module.html.haml index 2b13779b5..02f2678a2 100644 --- a/app/views/layouts/_switch_devise_profile_module.html.haml +++ b/app/views/layouts/_switch_devise_profile_module.html.haml @@ -1,25 +1,14 @@ - if SwitchDeviseProfileService.new(warden).multiple_devise_profile_connect? - #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 - - if user_signed_in? - %li - = link_to(dossiers_path, id: :menu_item_procedure) do - %i.fa.fa-user -   - Usager - - if gestionnaire_signed_in? - %li - = link_to(gestionnaire_procedures_path) do - %i.fa.fa-user -   - Instructeur - - - if administrateur_signed_in? - %li - = link_to(admin_procedures_path) do - %i.fa.fa-user -   - Administrateur + %ul#switch-menu + %li + Changer de rĂ´le + - if user_signed_in? + %li + = link_to(dossiers_path, id: :menu_item_procedure, title: 'Aller dans votre espace usager. Vous pourrez revenir ici ensuite') do + %i.fa.fa-users +   Usager + - if gestionnaire_signed_in? + %li + = link_to(gestionnaire_procedures_path, title: 'Aller dans votre espace instructeur. Vous pourrez revenir ici ensuite.') do + %i.fa.fa-user +   Instructeur diff --git a/app/views/layouts/application_old.html.haml b/app/views/layouts/application_old.html.haml index a5a6a67b8..633e368dc 100644 --- a/app/views/layouts/application_old.html.haml +++ b/app/views/layouts/application_old.html.haml @@ -48,6 +48,4 @@ %h1 %i.fa.fa-times{ style: 'position: fixed; top: 10; right: 30; color: white;' } - = render partial: 'layouts/switch_devise_profile_module' - = render partial: 'layouts/footer', locals: { main_container_size: main_container_size } diff --git a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_index.html.haml b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_index.html.haml index 508fafc9d..3a8c3aec8 100644 --- a/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_index.html.haml +++ b/app/views/layouts/left_panels/_left_panel_admin_procedurescontroller_index.html.haml @@ -28,6 +28,7 @@ = current_administrateur.procedures.archivees.count .split-hr-left + = render partial: 'layouts/switch_devise_profile_module' #infos-block