yavsc/Yavsc/Views/Blogspot/Index.cshtml

61 lines
1.6 KiB
Text
Raw Normal View History

2016-05-17 18:35:45 +02:00
@model IEnumerable<Yavsc.Models.Blog>
2016-05-17 18:22:18 +02:00
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p class="text-success">@ViewData["StatusMessage"]</p>
<p>
2016-07-27 11:09:49 +02:00
<a asp-action="Create">@SR["Create a new article"]</a>
2016-05-17 18:22:18 +02:00
</p>
<table class="table">
<tr>
<th>
2016-08-02 17:02:38 +02:00
@SR[Html.DisplayNameFor(model => model.Title)]
2016-05-17 18:22:18 +02:00
</th>
<th>
2016-07-27 11:09:49 +02:00
@SR["Author"]
2016-05-17 18:22:18 +02:00
</th>
2016-07-29 13:16:08 +02:00
<th>
@SR["Date"]
</th>
2016-05-17 18:22:18 +02:00
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
2016-08-02 17:02:38 +02:00
@Html.DisplayFor(modelItem => item.Photo)
<markdown>@item.Title</markdown>
2016-05-17 18:22:18 +02:00
</td>
<td>
2016-07-29 13:16:08 +02:00
@item.Author.UserName
2016-05-17 18:22:18 +02:00
</td>
<td>
2016-07-29 13:16:08 +02:00
<span style="font-size:x-small;">
2016-08-02 17:02:38 +02:00
posté le @item.Posted.ToString("dddd d MMM yyyy à H:mm")
@if ((item.Modified - item.Posted).Minutes > 10)
2016-07-29 13:16:08 +02:00
{ 
2016-08-02 17:02:38 +02:00
@:- Modifié le @item.Modified.ToString("dddd d MMM yyyy à H:mm")
2016-07-29 13:16:08 +02:00
}
</span>
</td>
<td>
2016-05-17 18:22:18 +02:00
<ul class="actiongroup">
<li><a asp-action="Details" asp-route-id="@item.Id">Details</a>
</li>
@if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) {
2016-07-27 11:09:49 +02:00
<li><a asp-action="Edit" asp-route-id="@item.Id">@SR["Edit"]</a>
2016-05-17 18:22:18 +02:00
</li>
2016-07-27 11:09:49 +02:00
<li><a asp-action="Delete" asp-route-id="@item.Id">@SR["Delete"]</a>
2016-05-17 18:22:18 +02:00
</li>
}
</ul>
</td>
</tr>
}
</table>