Improving Comments theming

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2013-02-28 19:04:20 -08:00
parent 9ff39b377a
commit 721c62f8d6
3 changed files with 6 additions and 13 deletions

View File

@@ -48,7 +48,6 @@ namespace Orchard.Comments.Drivers {
}); });
return Combined( return Combined(
ContentShape("Parts_Comment", () => shapeHelper.Parts_Comment(FormattedText: formattedText.Value)),
ContentShape("Parts_Comment_SummaryAdmin", () => shapeHelper.Parts_Comment_SummaryAdmin(FormattedText: formattedText.Value)) ContentShape("Parts_Comment_SummaryAdmin", () => shapeHelper.Parts_Comment_SummaryAdmin(FormattedText: formattedText.Value))
); );
} }

View File

@@ -24,15 +24,15 @@ namespace Orchard.Comments.Handlers {
}); });
OnLoading<CommentsPart>((context, comments) => { OnLoading<CommentsPart>((context, comments) => {
comments.CommentsField.Loader(list => contentManager comments.CommentsField.Loader(list =>
.Query<CommentPart, CommentPartRecord>() commentService.GetCommentsForCommentedContent(context.ContentItem.Id)
.Where(x => x.CommentsPartRecord == context.ContentItem.As<CommentsPart>().Record && x.Status == CommentStatus.Approved) .Where(x => x.Status == CommentStatus.Approved)
.OrderBy(x => x.Position) .OrderBy(x => x.Position)
.List().ToList()); .List().ToList());
comments.PendingCommentsField.Loader(list => contentManager comments.PendingCommentsField.Loader(list =>
.Query<CommentPart, CommentPartRecord>() commentService.GetCommentsForCommentedContent(context.ContentItem.Id)
.Where(x => x.CommentsPartRecord == context.ContentItem.As<CommentsPart>().Record && x.Status == CommentStatus.Pending) .Where(x => x.Status == CommentStatus.Pending)
.List().ToList()); .List().ToList());
}); });

View File

@@ -22,12 +22,6 @@
<Place Parts_CommentForm="Content:10.3" /> <Place Parts_CommentForm="Content:10.3" />
</Match> </Match>
<Match ContentType="Comment" DisplayType="Summary">
<Place Parts_Common_Metadata_Summary="-"
Parts_Comment="Content:10"
/>
</Match>
<Match DisplayType="Summary"> <Match DisplayType="Summary">
<Place Parts_Comments_Count="Meta:5" /> <Place Parts_Comments_Count="Meta:5" />
</Match> </Match>