yavsc/Yavsc/Views/Shared/DisplayTemplates/Comment.cshtml

12 lines
551 B
Plaintext

@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" >
<markdown>@Model.Content</markdown>
<div class="subcomments">
@if (Model.Children!=null && Model.Children.Count>0) {
foreach (var comment in Model.Children) {
@Html.DisplayFor(model=>comment,"Comment","Comment")
} }
</div>
</div>