21 lines
760 B
Plaintext
21 lines
760 B
Plaintext
@model HN.Application.CommentDto
|
|
|
|
<article class="comment">
|
|
<p>@Model.Content</p>
|
|
<ul class="comment__actions">
|
|
<li>posted at @Model.CreatedAt.ToLocalTime() by <strong>@Model.CreatedByName</strong></li>
|
|
<li>
|
|
<strong>@Model.UpVotes</strong> 👍 / <strong>@Model.DownVotes</strong> 👎
|
|
</li>
|
|
@if (User.Identity.IsAuthenticated)
|
|
{
|
|
<li>
|
|
<form class="votable" asp-controller="Comments" asp-action="Vote" asp-route-id="@Model.Id" method="post">
|
|
<input type="hidden" name="redirectTo" value="@Context.Request.Path" />
|
|
vote <input type="submit" name="type" value="up" /> or <input type="submit" name="type"
|
|
value="down" />
|
|
</form>
|
|
</li>
|
|
}
|
|
</ul>
|
|
</article> |