mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Removing Lists top level admin menu section.
To get to 'list of lists', user content type filter from the content items list. To create a new list, use 'new -> list' menu item or 'create new list' from the filtered item listing. --HG-- branch : dev
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
namespace Orchard.Lists {
|
||||
public class AdminMenu : INavigationProvider {
|
||||
private const string ListContentTypeName = "List";
|
||||
private readonly IContentManager _contentManager;
|
||||
|
||||
public AdminMenu(IContentManager contentManager) {
|
||||
_contentManager = contentManager;
|
||||
}
|
||||
|
||||
public Localizer T { get; set; }
|
||||
|
||||
public string MenuName { get { return "admin"; } }
|
||||
|
||||
public void GetNavigation(NavigationBuilder builder) {
|
||||
builder.AddImageSet("list")
|
||||
.Add(T("Lists"), "3", BuildMenu);
|
||||
}
|
||||
|
||||
private void BuildMenu(NavigationItemBuilder menu) {
|
||||
menu.Add(T("Manage Lists"), "1.0",
|
||||
item => item.Action("List", "Admin", new { area = "Contents", id = ListContentTypeName }));
|
||||
|
||||
var ci = _contentManager.New(ListContentTypeName);
|
||||
var metadata = _contentManager.GetItemMetadata(ci);
|
||||
menu.Add(T("Create New List"), "1.5",
|
||||
item => item.Action(metadata.CreateRouteValues["Action"] as string, metadata.CreateRouteValues["Controller"] as string, metadata.CreateRouteValues));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,6 @@
|
||||
<Reference Include="System.Web" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminMenu.cs" />
|
||||
<Compile Include="Handlers\ContainerPartHandler.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Routes.cs" />
|
||||
|
||||
Reference in New Issue
Block a user