79 lines
2.6 KiB
Plaintext
79 lines
2.6 KiB
Plaintext
@model Webzine.WebApplication.Areas.Administration.ViewModels.Titre.TitreIndexViewModel;
|
|
|
|
@{
|
|
ViewData["Title"] = "Titres";
|
|
}
|
|
|
|
<div class="container mt-4">
|
|
|
|
<h1 class="mb-3">Titres</h1>
|
|
<hr />
|
|
|
|
<a asp-action="Create" class="btn btn-primary mb-3">
|
|
<i class="fa fa-plus"></i> Ajouter un nouveau titre
|
|
</a>
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped table-hover table-bordered">
|
|
<thead class="table-active">
|
|
<tr>
|
|
<th>Artiste</th>
|
|
<th>Titre</th>
|
|
<th>Durée</th>
|
|
<th>Date de sortie</th>
|
|
<th class="text-center"><i class="fa fa-eye"></i></th>
|
|
<th class="text-center"><i class="fa fa-thumbs-up"></i></th>
|
|
<th class="text-center"><i class="fa fa-comments"></i></th>
|
|
<th class="text-center action-column">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach (var item in Model.Titres)
|
|
{
|
|
<tr>
|
|
<td>@item.Nom</td>
|
|
<td>@item.Titre</td>
|
|
<td>@item.Duree</td>
|
|
<td>@item.DateSortie.ToString("dd/MM/yyyy")</td>
|
|
|
|
<td class="text-center">@item.NbLectures</td>
|
|
<td class="text-center">@item.NbLikes</td>
|
|
<td class="text-center">@item.NbCommentaires</td>
|
|
|
|
<td class="text-center action-column">
|
|
|
|
<a asp-action="Edit" asp-route-id="@item.Id"
|
|
class="btn btn-sm text-primary">
|
|
<i class="fa fa-edit"></i>
|
|
</a>
|
|
|
|
<a asp-action="Delete" asp-route-id="@item.Id"
|
|
class="btn btn-sm text-primary">
|
|
<i class="fa fa-trash"></i>
|
|
</a>
|
|
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="row justify-content-between">
|
|
@if (Model.Page > 0)
|
|
{
|
|
<a asp-action="Index" asp-route-page="@(Model.Page - 1)"
|
|
class="btn btn-secondary col-auto mt-3">
|
|
<< Page précédente
|
|
</a>
|
|
}
|
|
@if (Model.Page < Model.TotalPages - 1)
|
|
{
|
|
<a asp-action="Index" asp-route-page="@(Model.Page + 1)"
|
|
class="btn btn-secondary col-auto mt-3 ms-auto">
|
|
Page suivante >>
|
|
</a>
|
|
}
|
|
</div>
|
|
</div> |