|
|
|
@ -88,55 +88,58 @@ |
|
|
|
|
|
|
|
<div class="cms-comment-area" data-entity-type="@Model.EntityType" data-entity-id="@Model.EntityId"> |
|
|
|
|
|
|
|
@foreach (var comment in Model.Comments) |
|
|
|
{ |
|
|
|
<div class="comment pt-2 pl-5 mt-1 mb-1"> |
|
|
|
<div class="border-bottom"> |
|
|
|
<h5> |
|
|
|
<i class="fa fa-comment-o"></i> |
|
|
|
@GetCommentTitle(comment.Author, comment.CreationTime).Invoke(null) |
|
|
|
</h5> |
|
|
|
|
|
|
|
@GetCommentContentArea(comment.Id, comment.Author.Id, false, comment.Text).Invoke(null) |
|
|
|
<div class="pl-5 pt-3"> |
|
|
|
<h4> |
|
|
|
<i class="fa fa-comment-o"></i> |
|
|
|
@L["Comments"] |
|
|
|
</h4> |
|
|
|
@foreach (var comment in Model.Comments) |
|
|
|
{ |
|
|
|
<div class="comment pt-2 mt-1 mb-1"> |
|
|
|
<div class="border-bottom"> |
|
|
|
<h5> |
|
|
|
@GetCommentTitle(comment.Author, comment.CreationTime).Invoke(null) |
|
|
|
</h5> |
|
|
|
|
|
|
|
@if (CurrentUser.IsAuthenticated) |
|
|
|
{ |
|
|
|
@GetCommentArea(comment.Id, true).Invoke(null) |
|
|
|
} |
|
|
|
@GetCommentContentArea(comment.Id, comment.Author.Id, false, comment.Text).Invoke(null) |
|
|
|
|
|
|
|
@if (comment.Replies.Any()) |
|
|
|
{ |
|
|
|
<div class="pl-5"> |
|
|
|
@foreach (var reply in comment.Replies) |
|
|
|
{ |
|
|
|
<div class="comment pt-3 mt-1"> |
|
|
|
<div class="border-top"> |
|
|
|
@if (CurrentUser.IsAuthenticated) |
|
|
|
{ |
|
|
|
@GetCommentArea(comment.Id, true).Invoke(null) |
|
|
|
} |
|
|
|
|
|
|
|
<h6> |
|
|
|
<i class="fa fa-comment-o"></i> |
|
|
|
@GetCommentTitle(reply.Author, reply.CreationTime).Invoke(null) |
|
|
|
</h6> |
|
|
|
@if (comment.Replies.Any()) |
|
|
|
{ |
|
|
|
<div class="pl-5"> |
|
|
|
@foreach (var reply in comment.Replies) |
|
|
|
{ |
|
|
|
<div class="comment pt-3"> |
|
|
|
<div class="border-bottom"> |
|
|
|
|
|
|
|
@GetCommentContentArea(reply.Id, reply.Author.Id, true, reply.Text).Invoke(null) |
|
|
|
<h6> |
|
|
|
@GetCommentTitle(reply.Author, reply.CreationTime).Invoke(null) |
|
|
|
</h6> |
|
|
|
|
|
|
|
@GetCommentContentArea(reply.Id, reply.Author.Id, true, reply.Text).Invoke(null) |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
<div class="p-3 pl-5"> |
|
|
|
@if (CurrentUser.IsAuthenticated) |
|
|
|
{ |
|
|
|
@GetCommentArea(null).Invoke(null) |
|
|
|
} |
|
|
|
else if (!string.IsNullOrWhiteSpace(Model.LoginUrl)) |
|
|
|
{ |
|
|
|
<div class="float-right mb-2"> |
|
|
|
<a href="@Model.LoginUrl" class="btn btn-primary"> @L["LoginToAddComment"]</a> |
|
|
|
} |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
} |
|
|
|
<div class="p-3 pl-5"> |
|
|
|
@if (CurrentUser.IsAuthenticated) |
|
|
|
{ |
|
|
|
@GetCommentArea(null).Invoke(null) |
|
|
|
} |
|
|
|
else if (!string.IsNullOrWhiteSpace(Model.LoginUrl)) |
|
|
|
{ |
|
|
|
<div class="float-right mb-2"> |
|
|
|
<a href="@Model.LoginUrl" class="btn btn-primary"> @L["LoginToAddComment"]</a> |
|
|
|
</div> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|