Basic post management

This commit is contained in:
Robert Marshall 2020-01-03 11:16:12 +00:00
parent 44875a6a45
commit 8f0c4c0a45
4 changed files with 65 additions and 5 deletions

View file

@ -0,0 +1,20 @@
@model IEnumerable<BlogPostViewModel>
@{
ViewBag.Title = "Manage posts";
}
<table>
<thead><tr>
<td>Title</td>
<td colspan="3">Action</td>
</tr></thead>
@foreach (var post in Model) {
<tr>
<td>@post.Title</td>
<td><a href="edit?id=@post.Id">Edit</a></td>
<td><a href="publish?id=@post.Id">Publish</a></td>
<td><a href="delete?id=@post.Id">Delete</a></td>
</tr>
}
</table>