yavsc/Yavsc/Views/Blogspot/Index.cshtml

62 lines
1.6 KiB
Plaintext

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

@model IEnumerable<Yavsc.Models.Blog>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p class="text-success">@ViewData["StatusMessage"]</p>
<p>
<a asp-action="Create">@SR["Create a new article"]</a>
</p>
<table class="table">
<tr>
<th>
@SR[Html.DisplayNameFor(model => model.title)]
</th>
<th>
@SR["Author"]
</th>
<th>
@SR["Date"]
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.photo)
<markdown>@item.title</markdown>
</td>
<td>
@item.Author.UserName
</td>
<td>
<span style="font-size:x-small;">
posté le @item.posted.ToString("dddd d MMM yyyy à H:mm")
@if ((item.modified - item.posted).Minutes > 10)
{ 
@:- Modifié le @item.modified.ToString("dddd d MMM yyyy à H:mm")
}
</span>
</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">@SR["Edit"]</a>
</li>
<li><a asp-action="Delete" asp-route-id="@item.Id">@SR["Delete"]</a>
</li>
}
</ul>
</td>
</tr>
}
</table>