mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 04:43:35 +08:00
Content Items and Content Types are now tabs under one 'Content' menu item. #adminflattening
--HG-- branch : dev
This commit is contained in:
@@ -22,8 +22,8 @@ namespace Orchard.Core.Contents {
|
|||||||
var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
|
var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
|
||||||
|
|
||||||
builder.AddImageSet("content")
|
builder.AddImageSet("content")
|
||||||
.Add(T("Content"), "2",
|
.Add(T("Content"), "2", menu => menu
|
||||||
menu => menu.Add(T("Content Items"), "1", item => item.Action("List", "Admin", new {area = "Contents", id = ""})));
|
.Add(T("Content Items"), "1", item => item.Action("List", "Admin", new { area = "Contents", id = "" }).LocalNav()));
|
||||||
|
|
||||||
var contentTypes = contentTypeDefinitions.Where(ctd => ctd.Settings.GetModel<ContentTypeSettings>().Creatable).OrderBy(ctd => ctd.DisplayName);
|
var contentTypes = contentTypeDefinitions.Where(ctd => ctd.Settings.GetModel<ContentTypeSettings>().Creatable).OrderBy(ctd => ctd.DisplayName);
|
||||||
if (contentTypes.Count() > 0) {
|
if (contentTypes.Count() > 0) {
|
||||||
|
@@ -10,7 +10,7 @@ namespace Orchard.ContentTypes {
|
|||||||
public void GetNavigation(NavigationBuilder builder) {
|
public void GetNavigation(NavigationBuilder builder) {
|
||||||
|
|
||||||
builder.Add(T("Content"),
|
builder.Add(T("Content"),
|
||||||
menu => menu.Add(T("Content Types"), "3", item => item.Action("Index", "Admin", new {area = "Orchard.ContentTypes"})));
|
menu => menu.Add(T("Content Types"), "3", item => item.Action("Index", "Admin", new { area = "Orchard.ContentTypes" }).LocalNav()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user