You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
using App2.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 App2.Menus;
|
|
|
|
public class App2MenuContributor : 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<App2Resource>();
|
|
|
|
context.Menu.Items.Insert(
|
|
0,
|
|
new ApplicationMenuItem(
|
|
App2Menus.Home,
|
|
l["Menu:Home"],
|
|
"~/",
|
|
icon: "fas fa-home",
|
|
order: 0
|
|
)
|
|
);
|
|
|
|
if (App2Module.IsMultiTenant)
|
|
{
|
|
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1);
|
|
}
|
|
else
|
|
{
|
|
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
|
|
}
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
|