From 778bc8a9dcf8707a846e9b24e35d9f76c0984b82 Mon Sep 17 00:00:00 2001 From: Ryan Drew Burnett Date: Thu, 5 Nov 2015 21:48:04 +0000 Subject: [PATCH] Fixed reply button and comment link and added useful CSS class. --- .../Orchard.Comments/Views/Parts.Comment.cshtml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/Parts.Comment.cshtml b/src/Orchard.Web/Modules/Orchard.Comments/Views/Parts.Comment.cshtml index b14a0ce10..2b54552dc 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Views/Parts.Comment.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/Parts.Comment.cshtml @@ -8,8 +8,13 @@ var children = New.List(Items: Model.Items); children.Classes.Add("comments"); + if (Model.Items.Count > 0) { + Model.Classes.Add("has-replies"); + } + Model.Classes.Add("comment"); - Model.Classes.Add("comment-"+comment.Id); + + Model.Id = "comment" + comment.Id; var tag = Tag(Model, "article"); } @tag.StartElement @@ -17,8 +22,8 @@

@Display.CommentAuthor(ContentPart: comment) @Display.CommentMetadata(ContentPart: comment) - @if (comments.ThreadedComments) { - @Display.CommentReplyButton(ContentPart: comment) + @if (comments.ThreadedComments && comments.CommentsActive) { + @Display.CommentReplyButton(ContentPart: comment) }