Add setting to hide Container editor

This commit is contained in:
Sebastien Ros
2015-09-16 15:25:09 -07:00
parent f3595881fe
commit 9e9e19c439
4 changed files with 18 additions and 1 deletions

View File

@@ -88,6 +88,10 @@ namespace Orchard.Core.Containers.Drivers {
protected override DriverResult Editor(ContainerPart part, IUpdateModel updater, dynamic shapeHelper) {
return ContentShape("Parts_Container_Edit", () => {
if(!part.ContainerSettings.DisplayContainerEditor) {
return null;
}
var containables = !part.ContainerSettings.RestrictItemContentTypes ? _containerService.GetContainableTypes().ToList() : new List<ContentTypeDefinition>(0);
var model = new ContainerViewModel {
AdminMenuPosition = part.AdminMenuPosition,