yavsc/Yavsc/Views/Blogspot/Index.cshtml
2016-08-02 17:02:38 +02:00

61 lines
1.6 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@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>