89 lines
2.1 KiB
Plaintext
89 lines
2.1 KiB
Plaintext
@model IEnumerable<Blog>
|
|
@{
|
|
ViewData["Title"] = "User posts";
|
|
}
|
|
|
|
<h2>Index</h2>
|
|
<p class="text-success">@ViewData["StatusMessage"]</p>
|
|
<p>
|
|
<a asp-action="Create">Create New</a>
|
|
</p>
|
|
<table class="table">
|
|
<tr>
|
|
<th>
|
|
@SR["Author"]
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Content)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Modified)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Photo)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Posted)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Rate)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Title)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.Visible)
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
|
|
@foreach (var item in Model) {
|
|
<tr>
|
|
<td>
|
|
@item.Author?.UserName
|
|
</td>
|
|
<td>
|
|
<div md-content="@item.Content"/>
|
|
</td>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Modified)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Photo)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Posted)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Rate)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Title)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.Visible)
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td>
|
|
<ul class="actiongroup">
|
|
<li>
|
|
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a>
|
|
</li><li>
|
|
<a asp-action="Details" asp-route-id="@item.Id">Details</a>
|
|
</li><li>
|
|
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
|
|
|
|
|