feat: Refactor Titre views and view models to use Administration area
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
@model IEnumerable<Webzine.WebApplication.Areas.Administration.ViewModels.Titre.AdminTitreList>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Titres";
|
||||
}
|
||||
|
||||
<div class="container mt-4">
|
||||
|
||||
<h1 class="mb-3">Titres</h1>
|
||||
<hr />
|
||||
|
||||
<a asp-action="" class="btn btn-primary mb-3">
|
||||
<i class="fa fa-plus"></i> Ajouter un nouvel titre
|
||||
</a>
|
||||
|
||||
<table class="table table-striped table-bordered align-middle">
|
||||
<thead class="table-light">
|
||||
<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)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.Artiste</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 btn-outline-primary">
|
||||
<i class="fa fa-pen"></i>
|
||||
</a>
|
||||
|
||||
<a asp-action="Delete" asp-route-id="@item.Id"
|
||||
class="btn btn-sm btn-outline-danger">
|
||||
<i class="fa fa-trash"></i>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
.action-column{
|
||||
width:120px;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
.action-column .btn{
|
||||
margin-right:4px;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user