Skip to content

Commit

Permalink
Enable edit the posts from the home page
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed Jun 7, 2017
1 parent 8fb40ab commit ed01638
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Bloggy/Views/Blog/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<h2><a href="/@post.Slug">@post.Title</a></h2>
<time>@post.PublishedAt.ToString("MMMM dd, yyyy")</time>
<p>@post.Excerpt</p>
@if (User.Identity.IsAuthenticated)
{
<span class="actions">[ <a asp-controller="Post" asp-action="Edit" asp-route-id="@post.Id">Edit</a> ]</span>
}
</article>
}
</section>
Expand Down

0 comments on commit ed01638

Please sign in to comment.