mirror of https://github.com/abpframework/abp.git
104 changed files with 544 additions and 184 deletions
@ -1,7 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"texts": { |
|||
"Welcome_Title": "欢迎", |
|||
"Welcome_Text": "这是ABP框架的极简单层应用程序启动模板." |
|||
} |
|||
} |
|||
"Welcome_Text": "这是ABP框架的极简单层应用程序启动模板.", |
|||
"Menu:Home": "首页" |
|||
} |
|||
} |
|||
|
|||
@ -1,7 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hant", |
|||
"texts": { |
|||
"texts": { |
|||
"Welcome_Title": "歡迎", |
|||
"Welcome_Text": "這是 ABP 框架的極簡單層應用程序啟動模板." |
|||
} |
|||
} |
|||
"Welcome_Text": "這是 ABP 框架的極簡單層應用程序啟動模板.", |
|||
"Menu:Home": "首頁" |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,46 @@ |
|||
using MyCompanyName.MyProjectName.Localization; |
|||
using Volo.Abp.Identity.Blazor; |
|||
using Volo.Abp.SettingManagement.Blazor.Menus; |
|||
using Volo.Abp.TenantManagement.Blazor.Navigation; |
|||
using Volo.Abp.UI.Navigation; |
|||
|
|||
namespace MyCompanyName.MyProjectName.Menus; |
|||
|
|||
public class MyProjectNameMenuContributor : IMenuContributor |
|||
{ |
|||
public async Task ConfigureMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
if (context.Menu.Name == StandardMenus.Main) |
|||
{ |
|||
await ConfigureMainMenuAsync(context); |
|||
} |
|||
} |
|||
|
|||
private Task ConfigureMainMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
var administration = context.Menu.GetAdministration(); |
|||
var l = context.GetLocalizer<MyProjectNameResource>(); |
|||
|
|||
context.Menu.Items.Insert( |
|||
0, |
|||
new ApplicationMenuItem( |
|||
MyProjectNameMenus.Home, |
|||
l["Menu:Home"], |
|||
"/", |
|||
icon: "fas fa-home", |
|||
order: 0 |
|||
) |
|||
); |
|||
|
|||
if (MyProjectNameModule.IsMultiTenant) |
|||
{ |
|||
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1); |
|||
} |
|||
else |
|||
{ |
|||
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName); |
|||
} |
|||
|
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
namespace MyCompanyName.MyProjectName.Menus; |
|||
|
|||
public class MyProjectNameMenus |
|||
{ |
|||
private const string Prefix = "MyProjectName"; |
|||
public const string Home = Prefix + ".Home"; |
|||
|
|||
//Add your menu items here...
|
|||
|
|||
} |
|||
@ -1,7 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"texts": { |
|||
"Welcome_Title": "欢迎", |
|||
"Welcome_Text": "这是ABP框架的极简单层应用程序启动模板." |
|||
} |
|||
} |
|||
"Welcome_Text": "这是ABP框架的极简单层应用程序启动模板.", |
|||
"Menu:Home": "首页" |
|||
} |
|||
} |
|||
|
|||
@ -1,7 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hant", |
|||
"texts": { |
|||
"texts": { |
|||
"Welcome_Title": "歡迎", |
|||
"Welcome_Text": "這是 ABP 框架的極簡單層應用程序啟動模板." |
|||
} |
|||
} |
|||
"Welcome_Text": "這是 ABP 框架的極簡單層應用程序啟動模板.", |
|||
"Menu:Home": "首頁" |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,46 @@ |
|||
using MyCompanyName.MyProjectName.Localization; |
|||
using Volo.Abp.Identity.Blazor; |
|||
using Volo.Abp.SettingManagement.Blazor.Menus; |
|||
using Volo.Abp.TenantManagement.Blazor.Navigation; |
|||
using Volo.Abp.UI.Navigation; |
|||
|
|||
namespace MyCompanyName.MyProjectName.Menus; |
|||
|
|||
public class MyProjectNameMenuContributor : IMenuContributor |
|||
{ |
|||
public async Task ConfigureMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
if (context.Menu.Name == StandardMenus.Main) |
|||
{ |
|||
await ConfigureMainMenuAsync(context); |
|||
} |
|||
} |
|||
|
|||
private Task ConfigureMainMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
var administration = context.Menu.GetAdministration(); |
|||
var l = context.GetLocalizer<MyProjectNameResource>(); |
|||
|
|||
context.Menu.Items.Insert( |
|||
0, |
|||
new ApplicationMenuItem( |
|||
MyProjectNameMenus.Home, |
|||
l["Menu:Home"], |
|||
"/", |
|||
icon: "fas fa-home", |
|||
order: 0 |
|||
) |
|||
); |
|||
|
|||
if (MyProjectNameModule.IsMultiTenant) |
|||
{ |
|||
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1); |
|||
} |
|||
else |
|||
{ |
|||
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName); |
|||
} |
|||
|
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
namespace MyCompanyName.MyProjectName.Menus; |
|||
|
|||
public class MyProjectNameMenus |
|||
{ |
|||
private const string Prefix = "MyProjectName"; |
|||
public const string Home = Prefix + ".Home"; |
|||
|
|||
//Add your menu items here...
|
|||
|
|||
} |
|||
@ -1,7 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"texts": { |
|||
"Welcome_Title": "欢迎", |
|||
"Welcome_Text": "这是ABP框架的极简单层应用程序启动模板." |
|||
} |
|||
} |
|||
"Welcome_Text": "这是ABP框架的极简单层应用程序启动模板.", |
|||
"Menu:Home": "首页" |
|||
} |
|||
} |
|||
|
|||
@ -1,7 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hant", |
|||
"texts": { |
|||
"texts": { |
|||
"Welcome_Title": "歡迎", |
|||
"Welcome_Text": "這是 ABP 框架的極簡單層應用程序啟動模板." |
|||
} |
|||
} |
|||
"Welcome_Text": "這是 ABP 框架的極簡單層應用程序啟動模板.", |
|||
"Menu:Home": "首頁" |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,46 @@ |
|||
using MyCompanyName.MyProjectName.Localization; |
|||
using Volo.Abp.Identity.Web.Navigation; |
|||
using Volo.Abp.SettingManagement.Web.Navigation; |
|||
using Volo.Abp.TenantManagement.Web.Navigation; |
|||
using Volo.Abp.UI.Navigation; |
|||
|
|||
namespace MyCompanyName.MyProjectName.Menus; |
|||
|
|||
public class MyProjectNameMenuContributor : IMenuContributor |
|||
{ |
|||
public async Task ConfigureMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
if (context.Menu.Name == StandardMenus.Main) |
|||
{ |
|||
await ConfigureMainMenuAsync(context); |
|||
} |
|||
} |
|||
|
|||
private Task ConfigureMainMenuAsync(MenuConfigurationContext context) |
|||
{ |
|||
var administration = context.Menu.GetAdministration(); |
|||
var l = context.GetLocalizer<MyProjectNameResource>(); |
|||
|
|||
context.Menu.Items.Insert( |
|||
0, |
|||
new ApplicationMenuItem( |
|||
MyProjectNameMenus.Home, |
|||
l["Menu:Home"], |
|||
"~/", |
|||
icon: "fas fa-home", |
|||
order: 0 |
|||
) |
|||
); |
|||
|
|||
if (MyProjectNameModule.IsMultiTenant) |
|||
{ |
|||
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1); |
|||
} |
|||
else |
|||
{ |
|||
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName); |
|||
} |
|||
|
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
namespace MyCompanyName.MyProjectName.Menus; |
|||
|
|||
public class MyProjectNameMenus |
|||
{ |
|||
private const string Prefix = "MyProjectName"; |
|||
public const string Home = Prefix + ".Home"; |
|||
|
|||
//Add your menu items here...
|
|||
|
|||
} |
|||
@ -1,7 +1,8 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"texts": { |
|||
"Welcome_Title": "欢迎", |
|||
"Welcome_Text": "这是ABP框架的极简单层应用程序启动模板." |
|||
} |
|||
} |
|||
"Welcome_Text": "这是ABP框架的极简单层应用程序启动模板.", |
|||
"Menu:Home": "首页" |
|||
} |
|||
} |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue