yavsc/Yavsc/Views/Blogspot/Index.cshtml

76 lines
2.1 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>
2016-05-17 18:22:18 +02:00
<table class="table">
<tr>
2016-08-03 16:38:25 +02:00
<th colspan="3">
2016-08-02 17:02:38 +02:00
@SR[Html.DisplayNameFor(model => model.Title)]
2016-05-17 18:22:18 +02:00
</th>
</tr>
@foreach (var item in Model) {
var trclass = (item.Visible)?"vpost":"ipost";
<tr class="@trclass">
<td><a asp-action="Details" asp-route-id="@item.Id">
<img src="@item.Photo" >
<markdown>@item.Title</markdown></a>
2016-05-17 18:22:18 +02:00
</td>
<td>
2016-08-03 16:38:25 +02:00
<span style="font-size:x-small;"> @item.Author.UserName </span> <br>
<span style="font-size:xx-small;">
2017-01-17 14:56:53 +01:00
posté le @item.DateCreated.ToString("dddd d MMM yyyy à H:mm")
@if ((item.DateModified - item.DateCreated).Minutes > 10){ 
@:- Modifié le @item.DateModified.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>
<style>
tr.vpost {
background-color: #80A050;
max-height: 3em;
}
tr.ipost {
background-color: #303030;
color: #b0b0b0;
font-size: smaller;
max-height: 3em;
}
tr.vpost a {
font-weight: bold;
color: white;
text-shadow: 3px 3px 8px black;
}
tr.ipost a {
font-style: bold;
color: #b0b0b0;
text-shadow: 3px 3px 5px #505050;
}
</style>
2016-05-17 18:22:18 +02:00