Browse Source

Added toolbar menu and localization

pull/56/head
Galip Tolga Erdem 5 years ago
parent
commit
6c63a21e52
  1. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/Menus/EShopOnAbpPublicWebMenuContributor.cs
  2. 1
      shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json
  3. 1
      shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json

2
apps/public-web/src/EShopOnAbp.PublicWeb/Menus/EShopOnAbpPublicWebMenuContributor.cs

@ -53,8 +53,10 @@ namespace EShopOnAbp.PublicWeb.Menus
var identityServerUrl = _configuration["AuthServer:Authority"] ?? "~"; var identityServerUrl = _configuration["AuthServer:Authority"] ?? "~";
var uiResource = context.GetLocalizer<AbpUiResource>(); var uiResource = context.GetLocalizer<AbpUiResource>();
var accountResource = context.GetLocalizer<AccountResource>(); var accountResource = context.GetLocalizer<AccountResource>();
var eShopResource = context.GetLocalizer<EShopOnAbpResource>();
context.Menu.AddItem(new ApplicationMenuItem("Account.Manage", accountResource["MyAccount"], $"{identityServerUrl.EnsureEndsWith('/')}Account/Manage", icon: "fa fa-cog", order: 1000, null, "_blank").RequireAuthenticated()); context.Menu.AddItem(new ApplicationMenuItem("Account.Manage", accountResource["MyAccount"], $"{identityServerUrl.EnsureEndsWith('/')}Account/Manage", icon: "fa fa-cog", order: 1000, null, "_blank").RequireAuthenticated());
context.Menu.AddItem(new ApplicationMenuItem("MyOrders", eShopResource["Menu:MyOrders"], $"/MyOrders", icon: "fa fa-shopping-cart", order: 2, null).RequireAuthenticated());
context.Menu.AddItem(new ApplicationMenuItem("Account.Logout", uiResource["Logout"], url: "~/Account/Logout", icon: "fa fa-power-off", order: int.MaxValue - 1000).RequireAuthenticated()); context.Menu.AddItem(new ApplicationMenuItem("Account.Logout", uiResource["Logout"], url: "~/Account/Logout", icon: "fa fa-power-off", order: int.MaxValue - 1000).RequireAuthenticated());
return Task.CompletedTask; return Task.CompletedTask;

1
shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/en.json

@ -2,6 +2,7 @@
"culture": "en", "culture": "en",
"texts": { "texts": {
"Menu:Home": "Home", "Menu:Home": "Home",
"Menu:MyOrders": "My Orders",
"Login": "Login", "Login": "Login",
"YourBasket": "Your Basket", "YourBasket": "Your Basket",
"EmptyBasket": "Empyt basket", "EmptyBasket": "Empyt basket",

1
shared/EShopOnAbp.Shared.Localization/Localization/EShopOnAbp/tr.json

@ -2,6 +2,7 @@
"culture": "tr", "culture": "tr",
"texts": { "texts": {
"Menu:Home": "Ana Sayfa", "Menu:Home": "Ana Sayfa",
"Menu:MyOrders": "Siparişlerim",
"Login": "Giriş", "Login": "Giriş",
"YourBasket": "Sepetiniz", "YourBasket": "Sepetiniz",
"EmptyBasket": "Sepetiniz boş", "EmptyBasket": "Sepetiniz boş",

Loading…
Cancel
Save