mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Improving Comments theming
--HG-- branch : 1.x
This commit is contained in:
@@ -48,7 +48,6 @@ namespace Orchard.Comments.Drivers {
|
||||
});
|
||||
|
||||
return Combined(
|
||||
ContentShape("Parts_Comment", () => shapeHelper.Parts_Comment(FormattedText: formattedText.Value)),
|
||||
ContentShape("Parts_Comment_SummaryAdmin", () => shapeHelper.Parts_Comment_SummaryAdmin(FormattedText: formattedText.Value))
|
||||
);
|
||||
}
|
||||
|
@@ -24,15 +24,15 @@ namespace Orchard.Comments.Handlers {
|
||||
});
|
||||
|
||||
OnLoading<CommentsPart>((context, comments) => {
|
||||
comments.CommentsField.Loader(list => contentManager
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.Where(x => x.CommentsPartRecord == context.ContentItem.As<CommentsPart>().Record && x.Status == CommentStatus.Approved)
|
||||
comments.CommentsField.Loader(list =>
|
||||
commentService.GetCommentsForCommentedContent(context.ContentItem.Id)
|
||||
.Where(x => x.Status == CommentStatus.Approved)
|
||||
.OrderBy(x => x.Position)
|
||||
.List().ToList());
|
||||
|
||||
comments.PendingCommentsField.Loader(list => contentManager
|
||||
.Query<CommentPart, CommentPartRecord>()
|
||||
.Where(x => x.CommentsPartRecord == context.ContentItem.As<CommentsPart>().Record && x.Status == CommentStatus.Pending)
|
||||
comments.PendingCommentsField.Loader(list =>
|
||||
commentService.GetCommentsForCommentedContent(context.ContentItem.Id)
|
||||
.Where(x => x.Status == CommentStatus.Pending)
|
||||
.List().ToList());
|
||||
});
|
||||
|
||||
|
@@ -22,12 +22,6 @@
|
||||
<Place Parts_CommentForm="Content:10.3" />
|
||||
</Match>
|
||||
|
||||
<Match ContentType="Comment" DisplayType="Summary">
|
||||
<Place Parts_Common_Metadata_Summary="-"
|
||||
Parts_Comment="Content:10"
|
||||
/>
|
||||
</Match>
|
||||
|
||||
<Match DisplayType="Summary">
|
||||
<Place Parts_Comments_Count="Meta:5" />
|
||||
</Match>
|
||||
|
Reference in New Issue
Block a user