comments ...

This commit is contained in:
Paul Schneider
2024-12-14 23:49:13 +00:00
parent f7b6b5e305
commit 5e5c6d57ea
6 changed files with 32 additions and 17 deletions

View File

@ -1,11 +1,16 @@
@model Comment
<div data-type="blogcomment" data-id="@Model.Id" data-allow-edit="@(User.GetUserId()==Model.AuthorId?"true":"false")"
data-allow-moderate="@ViewData["moderatoFlag"]" data-date="@Html.Raw(Model.DateCreated)" data-username="@Model.Author.UserName" >
data-allow-moderate="@ViewData["moderatoFlag"]" data-date="@Model.DateCreated.ToString("yyyy-MM-dd hh:mm:ss")" data-username="@Model.Author.UserName" >
<asciidoc>@Model.Content</asciidoc>
<div class="subcomments">
@if (Model.Children!=null && Model.Children.Count>0) {
foreach (var comment in Model.Children) {
@Html.DisplayFor(model=>comment,"Comment","Comment")
} }
</div>
@if (Model.Children!=null) {
<div class="subcomments">
@foreach (var comment in Model.Children)
{
Html.DisplayFor(model=>comment,"Comment","Comment");
}
</div>
}
</div>