|
|
|
|
@ -7,30 +7,15 @@
|
|
|
|
|
<h2>Index</h2>
|
|
|
|
|
<p class="text-success">@ViewData["StatusMessage"]</p>
|
|
|
|
|
<p>
|
|
|
|
|
<a asp-action="Create">Create New</a>
|
|
|
|
|
<a asp-action="Create">@SR["Create a new article"]</a>
|
|
|
|
|
</p>
|
|
|
|
|
<table class="table">
|
|
|
|
|
<tr>
|
|
|
|
|
<th>
|
|
|
|
|
@SR["Author"]
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
@Html.DisplayNameFor(model => model.title)
|
|
|
|
|
</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)
|
|
|
|
|
@SR[Html.DisplayNameFor(model => model.title)]
|
|
|
|
|
</th>
|
|
|
|
|
<th>
|
|
|
|
|
@Html.DisplayNameFor(model => model.visible)
|
|
|
|
|
@SR["Author"]
|
|
|
|
|
</th>
|
|
|
|
|
<th></th>
|
|
|
|
|
</tr>
|
|
|
|
|
@ -38,34 +23,24 @@
|
|
|
|
|
@foreach (var item in Model) {
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
@item.Author?.UserName
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
@Html.DisplayFor(modelItem => item.photo)
|
|
|
|
|
<markdown>@item.title</markdown>
|
|
|
|
|
</td>
|
|
|
|
|
<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.visible)
|
|
|
|
|
<em>@item.Author?.UserName</em>
|
|
|
|
|
<hr>
|
|
|
|
|
<i>@Html.DisplayFor(modelItem => item.posted)</i>
|
|
|
|
|
<i>@Html.DisplayFor(modelItem => item.modified)</i>
|
|
|
|
|
<i>@Html.DisplayFor(modelItem => item.rate)</i>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<ul class="actiongroup">
|
|
|
|
|
<li><a asp-action="Details" asp-route-id="@item.Id">Details</a>
|
|
|
|
|
</li>
|
|
|
|
|
@if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) {
|
|
|
|
|
<li><a asp-action="Edit" asp-route-id="@item.Id">Edit</a>
|
|
|
|
|
<li><a asp-action="Edit" asp-route-id="@item.Id">@SR["Edit"]</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li><a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
|
|
|
|
<li><a asp-action="Delete" asp-route-id="@item.Id">@SR["Delete"]</a>
|
|
|
|
|
</li>
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
|