Small change and comments

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044981
This commit is contained in:
loudej
2010-01-04 23:16:06 +00:00
parent b9b55940e8
commit 0329e836bc
2 changed files with 7 additions and 4 deletions

View File

@@ -34,12 +34,15 @@ namespace Orchard.ContentManagement {
return criteria.GetCriteriaByPath(path) ?? criteria.CreateCriteria(path);
}
ICriteria BindTypeCriteria() {
return BindCriteriaByPath(BindCriteriaByPath(BindItemVersionCriteria(), "ContentItemRecord"), "ContentType");
// ([ContentItemVersionRecord] >join> [ContentItemRecord]) >join> [ContentType]
return BindCriteriaByPath(BindItemCriteria(), "ContentType");
}
ICriteria BindItemCriteria() {
// [ContentItemVersionRecord] >join> [ContentItemRecord]
return BindCriteriaByPath(BindItemVersionCriteria(), "ContentItemRecord");
}
@@ -141,7 +144,7 @@ namespace Orchard.ContentManagement {
else if (_versionOptions.IsAllVersions) {
// no-op... all versions will be returned by default
}
else {
else {
throw new ApplicationException("Invalid VersionOptions for content query");
}

View File

@@ -36,6 +36,7 @@ namespace Orchard.ContentManagement.ViewModels {
public Func<HtmlHelper, ItemDisplayModel, HtmlHelper> Adaptor { get; set; }
public string TemplateName { get; set; }
public string Prefix { get; set; }
public ZoneCollection Zones { get; set; }
public IEnumerable<TemplateViewModel> Displays {
@@ -53,7 +54,6 @@ namespace Orchard.ContentManagement.ViewModels {
}
}
public ZoneCollection Zones { get; set; }
}
public class ItemDisplayModel<TPart> : ItemDisplayModel where TPart : IContent {