diff --git a/app/assets/images/menu/icn-login.svg b/app/assets/images/menu/icn-login.svg new file mode 100644 index 0000000000..b790141d11 --- /dev/null +++ b/app/assets/images/menu/icn-login.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/app/assets/images/menu/icn-profile.svg b/app/assets/images/menu/icn-profile.svg new file mode 100755 index 0000000000..cc30acc595 --- /dev/null +++ b/app/assets/images/menu/icn-profile.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/views/shared/menu/_large_menu.html.haml b/app/views/shared/menu/_large_menu.html.haml index bcbf7a0066..aea198d437 100644 --- a/app/views/shared/menu/_large_menu.html.haml +++ b/app/views/shared/menu/_large_menu.html.haml @@ -28,9 +28,9 @@ %li %a{href: "?locale=#{l.to_s}" }= t('language_name', locale: l) - if spree_current_user.nil? - = render 'shared/signed_out' + = render 'shared/menu/signed_out' - else - = render 'shared/signed_in' + = render 'shared/menu/signed_in' %li.current_hub{"ng-controller" => "CurrentHubCtrl", "ng-show" => "CurrentHub.hub.id", "ng-cloak" => true} %a{href: main_app.shop_path} %em diff --git a/app/views/shared/menu/_mobile_menu.html.haml b/app/views/shared/menu/_mobile_menu.html.haml index 9fdfad4af8..d2446439c1 100644 --- a/app/views/shared/menu/_mobile_menu.html.haml +++ b/app/views/shared/menu/_mobile_menu.html.haml @@ -39,6 +39,6 @@ %a{href: "?locale=#{l.to_s}" }= t('language_name', locale: l) %li - if spree_current_user.nil? - = render 'shared/signed_out' + = render 'shared/menu/signed_out' - else - = render 'shared/signed_in_offcanvas' + = render 'shared/menu/signed_in_offcanvas' diff --git a/app/views/shared/_signed_in.html.haml b/app/views/shared/menu/_signed_in.html.haml similarity index 72% rename from app/views/shared/_signed_in.html.haml rename to app/views/shared/menu/_signed_in.html.haml index c155a7bff2..404600046d 100644 --- a/app/views/shared/_signed_in.html.haml +++ b/app/views/shared/menu/_signed_in.html.haml @@ -5,15 +5,17 @@ = t 'label_notices' %li.user-menu.has-dropdown.not-click - - %a{href: "#"} - %i.ofn-i_022-cog - + + %a{href: "#"} + %img{ src: "/assets/menu/icn-profile.svg" } + %span + = t '.profile' + %ul.dropdown - + - if admin_user? or enterprise_user? %li - %a{href: spree.admin_path, target:'_blank'} + %a{href: spree.admin_path, target:'_blank'} %i.ofn-i_021-tools = t 'label_administration' @@ -22,8 +24,8 @@ %i.ofn-i_015-user = t 'label_account' = "(" + spree_current_user.email + ")" - + %li - %a{title: t('label_logout'), href:'/logout' } + %a{title: t('label_logout'), href:'/logout' } %i.ofn-i_018-unlocked = t 'label_logout' diff --git a/app/views/shared/_signed_in_offcanvas.html.haml b/app/views/shared/menu/_signed_in_offcanvas.html.haml similarity index 80% rename from app/views/shared/_signed_in_offcanvas.html.haml rename to app/views/shared/menu/_signed_in_offcanvas.html.haml index f34a03068f..7318ef42a1 100644 --- a/app/views/shared/_signed_in_offcanvas.html.haml +++ b/app/views/shared/menu/_signed_in_offcanvas.html.haml @@ -7,7 +7,7 @@ - if admin_user? or enterprise_user? %li - %a{href: spree.admin_path, target:'_blank'} + %a{href: spree.admin_path, target:'_blank'} %i.ofn-i_021-tools = t 'label_admin' @@ -17,6 +17,6 @@ = t 'label_account' %li - %a{title: t('label_logout'), href:'/logout' } + %a{title: t('label_logout'), href:'/logout' } %i.ofn-i_018-unlocked = t 'label_logout' diff --git a/app/views/shared/_signed_out.html.haml b/app/views/shared/menu/_signed_out.html.haml similarity index 61% rename from app/views/shared/_signed_out.html.haml rename to app/views/shared/menu/_signed_out.html.haml index 1e6efdc32a..fdb827031f 100644 --- a/app/views/shared/_signed_out.html.haml +++ b/app/views/shared/menu/_signed_out.html.haml @@ -1,5 +1,5 @@ %li#login-link %a{"auth" => "login"} - %i.ofn-i_017-locked + %img{ src: "/assets/menu/icn-login.svg" } %span = t 'label_login' diff --git a/config/locales/en.yml b/config/locales/en.yml index d92e464160..994a25993a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1115,6 +1115,8 @@ en: cart: checkout: "Checkout now" already_ordered_products: "Already ordered in this order cycle" + signed_in: + profile: "Profile" register_call: selling_on_ofn: "Interested in getting on the Open Food Network?" register: "Register here"