Browse Source

Added comment count to blog posts.

tags/3.0.0^2
Teknikode 9 months ago
parent
commit
f346ac718c
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      Teknik/Areas/Blog/Views/Blog/Post.cshtml

+ 4
- 0
Teknik/Areas/Blog/Views/Blog/Post.cshtml View File

@@ -12,6 +12,10 @@
by <a href="@Url.SubRouteUrl("user", "User.ViewProfile", new { username = Model.Blog.User.Username })">@Model.Blog.User.Username</a>
</text>
}
@if (Model.Comments.Any())
{
@: - @Model.Comments.Count comment@(Model.Comments.Count > 1 ? "s" : "")
}
@if (Model.Blog.User.Username == User.Identity.Name || User.IsInRole("Admin"))
{
<br />

Loading…
Cancel
Save