yavsc/Yavsc/Views/Comments/Index.cshtml

63 lines
1.5 KiB
Plaintext

@model IEnumerable<Yavsc.Models.Blog.Comment>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Content)
</th>
<th>
@Html.DisplayNameFor(model => model.DateCreated)
</th>
<th>
@Html.DisplayNameFor(model => model.DateModified)
</th>
<th>
@Html.DisplayNameFor(model => model.UserCreated)
</th>
<th>
@Html.DisplayNameFor(model => model.UserModified)
</th>
<th>
@Html.DisplayNameFor(model => model.Visible)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Content)
</td>
<td>
@Html.DisplayFor(modelItem => item.DateCreated)
</td>
<td>
@Html.DisplayFor(modelItem => item.DateModified)
</td>
<td>
@Html.DisplayFor(modelItem => item.UserCreated)
</td>
<td>
@Html.DisplayFor(modelItem => item.UserModified)
</td>
<td>
@Html.DisplayFor(modelItem => item.Visible)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</table>