comments ...

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

View file

@ -80,11 +80,11 @@ $('#commentValidation').html(
@if (User.GetUserId()!=null) {
<div class="form-horizontal">
<div class="input-group" >
<input name="Comment" id="Comment" class="form-control" placeholder="DoCommentPlaceHolder"]"/>
<input name="Comment" id="Comment" class="form-control" placeholder="..."/>
<span class="input-group-btn">
<span id="commentValidation"></span>
<input type="button" value="DoComment"]" class="btn btn-secondary"
<input type="button" value="Comment" class="btn btn-secondary"
data-receiverId="@Model.Id" id="cmtBtn"
/>
</span>

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>