#18165: Injecting ContentPart, ContentItem and ContentField properties automatically in any Shape

Work Item: 18165

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-12-30 15:26:41 -08:00
parent 28a0b2fde6
commit 19f8286258
20 changed files with 141 additions and 85 deletions

View File

@@ -21,9 +21,9 @@ namespace Orchard.Comments.Drivers {
return Combined(
ContentShape("Parts_Comments_Count",
() => shapeHelper.Parts_Comments_Count(ContentPart: part, CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount)),
() => shapeHelper.Parts_Comments_Count(CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount)),
ContentShape("Parts_Comments_Count_SummaryAdmin",
() => shapeHelper.Parts_Comments_Count_SummaryAdmin(ContentPart: part, CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount))
() => shapeHelper.Parts_Comments_Count_SummaryAdmin(CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount))
);
}
}

View File

@@ -23,11 +23,11 @@ namespace Orchard.Comments.Drivers {
return Combined(
ContentShape("Parts_Comments",
() => shapeHelper.Parts_Comments(ContentPart: part)),
() => shapeHelper.Parts_Comments()),
ContentShape("Parts_Comments_Count",
() => shapeHelper.Parts_Comments_Count(ContentPart: part, CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount)),
() => shapeHelper.Parts_Comments_Count(CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount)),
ContentShape("Parts_Comments_Count_SummaryAdmin",
() => shapeHelper.Parts_Comments_Count_SummaryAdmin(ContentPart: part, CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount))
() => shapeHelper.Parts_Comments_Count_SummaryAdmin(CommentCount: commentsForCommentedContent.Count(), PendingCount: pendingCount))
);
}