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

55 lines
1.8 KiB
Plaintext

@model IEnumerable<Webzine.Entity.Style>
@{
ViewData["Title"] = "Styles";
}
<div class="container mt-4">
<h1 class="mb-3">Styles</h1>
<hr />
<div class="mb-3">
<a asp-action="Create" class="btn btn-primary">
<i class="fas fa-plus"></i> Ajouter un nouvel style
</a>
</div>
<div class="table-responsive">
<table class="table table-striped table-hover table-bordered table-sm">
<thead class="table-active">
<tr>
<th scope="col" class="p-2">Libellé</th>
<th scope="col" class="text-center p-2">Actions</th>
</tr>
</thead>
<tbody>
@if ( Model.Any())
{
@foreach (Webzine.Entity.Style style in Model)
{
<tr >
<td class="p-2 w-75">
@style.Libelle
</td>
<td class="text-center w-auto p-2">
<a asp-action="Edit" asp-route-id="@style.IdStyle" class="text-primary me-2" title="Éditer">
<i class="fas fa-edit"></i>
</a>
<a asp-action="Delete" asp-route-id="@style.IdStyle" title="Supprimer">
<i class="fas fa-trash"></i>
</a>
</td>
</tr>
}
}
else
{
<tr>
<td colspan="2" class="text-center p-2">Aucun style disponible.</td>
</tr>
}
</tbody>
</table>
</div>
</div>