Browse Source

Fixed comments showing the user as the blog post author.

tags/2.0.3
Teknikode 4 years ago
parent
commit
6d33a4258b
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Teknik/Areas/Blog/Views/Blog/Comment.cshtml

+ 2
- 2
Teknik/Areas/Blog/Views/Blog/Comment.cshtml View File

@@ -7,8 +7,8 @@
<div class="col-sm-8 col-sm-offset-2">
<div class="post-comment">
<p class="post-comment-meta text-muted">
<a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = Model.Post.Blog.User.Username })">@Model.Post.Blog.User.Username</a> replied at <time datetime="@Model.DatePosted.ToString("o")">@Model.DatePosted.ToString("hh:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")</time>
@if (Model.Post.Blog.User.Username == User.Identity.Name || User.IsInRole("Admin"))
<a href="@Url.SubRouteUrl("profile", "Profile.Index", new { username = Model.User.Username })">@Model.User.Username</a> replied at <time datetime="@Model.DatePosted.ToString("o")">@Model.DatePosted.ToString("hh:mm:ss tt") on @Model.DatePosted.ToString("MMMM dd, yyyy")</time>
@if (Model.User.Username == User.Identity.Name || User.IsInRole("Admin"))
{
<br />
<button type="button" class="btn btn-info edit_comment" id="@Model.CommentId" data-toggle="modal" data-target="#editComment">Edit</button>

Loading…
Cancel
Save