|
|
|
@ -1,11 +1,13 @@ |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using MyCompanyName.MyProjectName.Localization; |
|
|
|
using Volo.Abp.Account.Localization; |
|
|
|
using MyCompanyName.MyProjectName.MultiTenancy; |
|
|
|
using Volo.Abp.Identity.Blazor; |
|
|
|
using Volo.Abp.SettingManagement.Blazor.Menus; |
|
|
|
using Volo.Abp.TenantManagement.Blazor.Navigation; |
|
|
|
using Volo.Abp.UI.Navigation; |
|
|
|
using Volo.Abp.Users; |
|
|
|
//<TEMPLATE-REMOVE IF-NOT='CMS-KIT'>
|
|
|
|
using Volo.CmsKit.Admin.Web.Menus; |
|
|
|
//</TEMPLATE-REMOVE>
|
|
|
|
|
|
|
|
namespace MyCompanyName.MyProjectName.Blazor.Server.Menus |
|
|
|
{ |
|
|
|
@ -21,6 +23,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Menus |
|
|
|
|
|
|
|
private Task ConfigureMainMenuAsync(MenuConfigurationContext context) |
|
|
|
{ |
|
|
|
var administration = context.Menu.GetAdministration(); |
|
|
|
var l = context.GetLocalizer<MyProjectNameResource>(); |
|
|
|
|
|
|
|
context.Menu.Items.Insert( |
|
|
|
@ -29,9 +32,26 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Menus |
|
|
|
MyProjectNameMenus.Home, |
|
|
|
l["Menu:Home"], |
|
|
|
"/", |
|
|
|
icon: "fas fa-home" |
|
|
|
icon: "fas fa-home", |
|
|
|
order: 0 |
|
|
|
) |
|
|
|
); |
|
|
|
|
|
|
|
//<TEMPLATE-REMOVE IF-NOT='CMS-KIT'>
|
|
|
|
context.Menu.SetSubItemOrder(CmsKitAdminMenus.GroupName, 1); |
|
|
|
//</TEMPLATE-REMOVE>
|
|
|
|
|
|
|
|
if (MultiTenancyConsts.IsEnabled) |
|
|
|
{ |
|
|
|
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName); |
|
|
|
} |
|
|
|
|
|
|
|
administration.SetSubItemOrder(IdentityMenuNames.GroupName, 2); |
|
|
|
administration.SetSubItemOrder(SettingManagementMenus.GroupName, 3); |
|
|
|
|
|
|
|
return Task.CompletedTask; |
|
|
|
} |
|
|
|
|