From 7718cf0c48f73e1e630fc3b53a735766c8f5347e Mon Sep 17 00:00:00 2001 From: summerscope Date: Wed, 23 Jul 2014 15:35:44 +1000 Subject: [PATCH] Fix markup for menu systems - order, remove double-up of ADMIN, consistency of case, design. All the things --- app/views/shared/_signed_in.html.haml | 35 +++++++++---------- .../shared/_signed_in_offcanvas.html.haml | 21 +++++------ app/views/shared/_signed_out.html.haml | 2 +- app/views/shared/menu/_mobile_menu.html.haml | 30 ++++++---------- 4 files changed, 39 insertions(+), 49 deletions(-) diff --git a/app/views/shared/_signed_in.html.haml b/app/views/shared/_signed_in.html.haml index 967986f4f1..0d952dc4a8 100644 --- a/app/views/shared/_signed_in.html.haml +++ b/app/views/shared/_signed_in.html.haml @@ -1,27 +1,24 @@ -/ %li#login-name -/ %a{"ng-click" => "toggle('/account')"} -/ = spree_current_user.email -/ %li#sign-out-link -/ %a{title: 'Log Out', href:'/logout' } -/ %i.ofn-i_018-unlocked -/ LOG OUT -/ = link_to "Sign Out", "/logout" -/ %li.divider %li.has-dropdown.not-click + %a{href: "#"} %i.ofn-i_022-cog + %ul.dropdown - %li - %a{href: spree.account_path} - %i.ofn-i_015-user - = spree_current_user.email - %li - %a{title: 'Log Out', href:'/logout' } - %i.ofn-i_018-unlocked - LOG OUT - + - if admin_user? or enterprise_user? %li %a{href: spree.admin_path} %i.ofn-i_021-tools - Admin \ No newline at end of file + Admin + + %li + %a{href: spree.account_path} + %i.ofn-i_015-user + = spree_current_user.email + + %li + %a{title: 'Log Out', href:'/logout' } + %i.ofn-i_018-unlocked + Log out + + \ No newline at end of file diff --git a/app/views/shared/_signed_in_offcanvas.html.haml b/app/views/shared/_signed_in_offcanvas.html.haml index e500646e62..c063a885fe 100644 --- a/app/views/shared/_signed_in_offcanvas.html.haml +++ b/app/views/shared/_signed_in_offcanvas.html.haml @@ -1,14 +1,15 @@ -%li - %a{href: spree.account_path} - %i.ofn-i_015-user - = spree_current_user.email -%li - %a{title: 'Log Out', href:'/logout' } - %i.ofn-i_018-unlocked - LOG OUT - - if admin_user? or enterprise_user? %li %a{href: spree.admin_path} %i.ofn-i_021-tools - Admin \ No newline at end of file + Admin + +%li + %a{href: spree.account_path} + %i.ofn-i_015-user + = spree_current_user.email + +%li + %a{title: 'Log Out', href:'/logout' } + %i.ofn-i_018-unlocked + Log out \ No newline at end of file diff --git a/app/views/shared/_signed_out.html.haml b/app/views/shared/_signed_out.html.haml index a004344038..237baa6bd8 100644 --- a/app/views/shared/_signed_out.html.haml +++ b/app/views/shared/_signed_out.html.haml @@ -1,5 +1,5 @@ %li#login-link{"ng-controller" => "AuthenticationCtrl"} %a{"ng-click" => "open()"} %i.ofn-i_017-locked - %span LOG IN + %span Log in diff --git a/app/views/shared/menu/_mobile_menu.html.haml b/app/views/shared/menu/_mobile_menu.html.haml index 1cbc09e578..df468363bd 100644 --- a/app/views/shared/menu/_mobile_menu.html.haml +++ b/app/views/shared/menu/_mobile_menu.html.haml @@ -10,45 +10,37 @@ %aside.left-off-canvas-menu.show-for-medium-down %ul.off-canvas-list %li= link_to image_tag("ofn_logo_small.png"), root_path - - - if admin_user? or enterprise_user? - %li - %a{href: spree.admin_path} - %span.nav-primary - %i.ofn-i_021-tools - Admin - %li - - if spree_current_user.nil? - = render 'shared/signed_out' - - else - = render 'shared/signed_in_offcanvas' - + - if current_page? root_path - %li + %li.li-menu %a{"ofn-scroll-to" => "hubs"} %span.nav-primary %i.ofn-i_040-hub Hubs - else - %li + %li.li-menu %a{href: root_path + "#/#hubs"} %span.nav-primary %i.ofn-i_040-hub Hubs - %li + %li.li-menu %a{href: main_app.map_path} %span.nav-primary %i.ofn-i_037-map Map - %li + %li.li-menu %a{href: main_app.producers_path} %span.nav-primary %i.ofn-i_036-producers Producers - %li + %li.li-menu %a{href: main_app.groups_path} %span.nav-primary %i.ofn-i_035-groups Groups - + %li + - if spree_current_user.nil? + = render 'shared/signed_out' + - else + = render 'shared/signed_in_offcanvas'