Choose items defaults to filter content type by the restricted type of the target container.

--HG--
branch : dev
This commit is contained in:
Dave Reed
2011-03-23 11:56:14 -07:00
parent f98505d75f
commit d1819a7f77

View File

@@ -199,6 +199,12 @@ namespace Lists.Controllers {
if (container == null && model.SourceContainerId != 0) {
return HttpNotFound();
}
if (string.IsNullOrEmpty(model.FilterByContentType)) {
var targetContainer = _contentManager.Get<ContainerPart>(model.TargetContainerId);
if (targetContainer != null) {
model.FilterByContentType = targetContainer.Record.ItemContentType;
}
}
var query = _contentManager.Query<ContainablePart>(VersionOptions.Latest);