- Changement de la route - CSS remplacé par bootstrap
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
@model Webzine.WebApplication.Areas.Administration.ViewModels.CommentaireViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Commentaires";
|
||||
}
|
||||
|
||||
|
||||
<div class="justify-content-center m-5">
|
||||
<h1 class="mb-4">Commentaires</h1>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th scope="col">Titre</th>
|
||||
<th scope="col">Auteur</th>
|
||||
<th scope="col">Commentaire</th>
|
||||
<th scope="col">Date de création</th>
|
||||
<th scope="col" class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (Webzine.Entity.Commentaire commentaire in Model.Commentaires)
|
||||
{
|
||||
<tr class="align-middle">
|
||||
<td>
|
||||
@(commentaire.Titre != null ? commentaire.Titre.Libelle : "Titre inconnu")
|
||||
</td>
|
||||
<td>
|
||||
@commentaire.Auteur
|
||||
</td>
|
||||
<td>
|
||||
@commentaire.Contenu
|
||||
</td>
|
||||
<td>
|
||||
@commentaire.DateCreation.ToString("dd/MM/yyyy HH:mm:ss")
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<form method="post" action="@Url.Action("Delete", new { id = commentaire.IdCommentaire })" class="d-inline">
|
||||
@Html.AntiForgeryToken()
|
||||
<!-- Bouton rouge (text-danger) sans fond (btn-link) -->
|
||||
<button type="submit" class="btn btn-link text-primary p-0" title="Supprimer" onclick="return confirm('Êtes-vous sûr de vouloir supprimer ce commentaire ?');">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user