mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 03:58:13 +08:00
Sorting content types in Form editor
--HG-- branch : 1.x
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
using Orchard.ContentManagement.MetaData;
|
using Orchard.ContentManagement.MetaData;
|
||||||
using Orchard.DisplayManagement;
|
using Orchard.DisplayManagement;
|
||||||
@@ -40,7 +41,7 @@ namespace Orchard.Core.Contents.Rules {
|
|||||||
|
|
||||||
f._Parts.Add(new SelectListItem { Value = "", Text = T("Any").Text });
|
f._Parts.Add(new SelectListItem { Value = "", Text = T("Any").Text });
|
||||||
|
|
||||||
foreach (var contentType in _contentDefinitionManager.ListTypeDefinitions()) {
|
foreach (var contentType in _contentDefinitionManager.ListTypeDefinitions().OrderBy(x => x.DisplayName)) {
|
||||||
f._Parts.Add(new SelectListItem { Value = contentType.Name, Text = contentType.DisplayName });
|
f._Parts.Add(new SelectListItem { Value = contentType.Name, Text = contentType.DisplayName });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user