Fixed reply button and comment link and added useful CSS class.

This commit is contained in:
Ryan Drew Burnett
2015-11-05 21:48:04 +00:00
parent bcf4813c3e
commit 778bc8a9dc

View File

@@ -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 @@
<h4>
<span class="who">@Display.CommentAuthor(ContentPart: comment)</span>
<span class="when">@Display.CommentMetadata(ContentPart: comment)</span>
@if (comments.ThreadedComments) {
<span class="reply">@Display.CommentReplyButton(ContentPart: comment)</span>
@if (comments.ThreadedComments && comments.CommentsActive) {
@Display.CommentReplyButton(ContentPart: comment)
}
</h4>
</header>