-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdminMenu.cs
33 lines (29 loc) · 1.04 KB
/
AdminMenu.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using CoreUIAdmin.Drivers;
using Microsoft.Extensions.Localization;
using OrchardCore.Environment.Navigation;
using System;
namespace CoreUIAdmin
{
public class AdminMenu : INavigationProvider
{
public AdminMenu(IStringLocalizer<AdminMenu> localizer)
{
T = localizer;
}
public IStringLocalizer T { get; set; }
public void BuildNavigation(string name, NavigationBuilder builder)
{
if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase))
{
return;
}
builder
.Add(T["Configuration"], configuration => configuration
.Add(T["Settings"], settings => settings
.Add(T["CoreUI Theme"], T["CoreUI Theme"], layers => layers
.Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = CoreUIThemeSiteSettingsDisplayDriver.GroupId })
.LocalNav()
)));
}
}
}