#17312: Refactoring ContainerPart to use a driver

Work Item: 17312

--HG--
branch : 1.x
This commit is contained in:
piedone
2011-11-15 11:46:33 -08:00
parent 5d94aefdc0
commit 679e4fed3d
14 changed files with 228 additions and 81 deletions

View File

@@ -2,7 +2,6 @@
using System.Linq;
using System.Web.Mvc;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Aspects;
using Orchard.ContentManagement.Drivers;
using Orchard.Core.Common.Models;
using Orchard.Core.Containers.Models;
@@ -44,6 +43,7 @@ namespace Orchard.Core.Containers.Drivers {
commonPart.Record.Container = containerItem == null ? null : containerItem.Record;
}
}
part.Weight = model.Weight;
}
// note: string.isnullorempty not being recognized by linq-to-nhibernate hence the inline or
@@ -59,6 +59,7 @@ namespace Orchard.Core.Containers.Drivers {
.ToList();
model.AvailableContainers = new SelectList(listItems, "Value", "Text", model.ContainerId);
model.Weight = part.Weight;
return shapeHelper.EditorTemplate(TemplateName: "Containable", Model: model, Prefix: "Containable");
});