-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdminMenu.cs
29 lines (25 loc) · 1.01 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
using Orchard.UI.Navigation;
using Orchard.Localization;
using Demo.Movies;
namespace Demo.Movies
{
public class AdminMenu : INavigationProvider
{
public Localizer T { get; set; }
public string MenuName
{
get { return "admin"; }
}
public void GetNavigation(NavigationBuilder builder)
{
builder.Add(T("Movies"), "5", BuildMenu);
}
private void BuildMenu(NavigationItemBuilder menu)
{
menu.Add(T("List"), "1.1", item => item.Action("List", "Admin", new { area = "Contents", id = "Movie" }));
menu.Add(T("New Movie"), "1.2", item => item.Action("Create", "Admin", new { area = "Contents", id = "Movie" }));
menu.Add(T("Movie Lookup"), "1.3", item => item.Action("Index", "MovieLookup", new { area = "Demo.Movies" }).Permission(Permissions.LookupMovie));
menu.Add(T("Actors"), "2.0", item => item.Action("Index", "ActorsAdmin", new { area = "Demo.Movies" }));
}
}
}