Files
webzine/Webzine.WebApplication/Areas/Administration/Views/Artiste/Index.cshtml

53 lines
1.8 KiB
Plaintext

@model Webzine.WebApplication.Areas.Administration.ViewModels.Artiste.GroupeArtisteViewModel
@{
ViewData["Title"] = "Artiste";
}
<div class="container mt-4">
<h1 class="mb-4">Artiste</h1>
<hr />
<a asp-action="" class="btn btn-primary mb-3">
<i class="fa fa-plus"></i> Ajouter un nouvel titre
</a>
<div class="table-responsive">
<table class="table table-striped table-hover table-bordered">
<thead class="table-active">
<tr>
<th scope="col">Nom de l'artiste</th>
<th scope="col" class="text-center">Actions</th>
</tr>
</thead>
<tbody>
@* On groupe les artistes par nom *@
@{
var artistes = Model.Artistes
.OrderBy(t => t.Nom); // Trie les artistes par ordre alphabétique
}
@foreach (var artiste in artistes)
{
<tr class="align-middle">
<td class="col-10">
@artiste.Nom
</td>
<td class="text-center">
<a asp-action="Edit" asp-route-id="@artiste.IdArtiste"
class="btn btn-sm text-primary">
<i class="fa fa-pen"></i>
</a>
<a asp-action="Delete" asp-route-id="@artiste.IdArtiste"
class="btn btn-sm text-primary">
<i class="fa fa-trash"></i>
</a>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>