creation page liste des articles
This commit is contained in:
57
blog/categories/articles/liste_articles.html
Normal file
57
blog/categories/articles/liste_articles.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Liste des articles</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f9;
|
||||
}
|
||||
.container {
|
||||
margin-top: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2 class="mb-0">Listes des articles</h2>
|
||||
<a href="ajouter_articles.html" class="btn btn-primary">Ajouter un article</a>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered table-hover bg-white">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Titre</th>
|
||||
<th>Catégorie</th>
|
||||
<th>Publié</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--Exemple d'article-->
|
||||
<tr>
|
||||
<td>Mon premier article</td>
|
||||
<td>Chien</td>
|
||||
<td>Oui</td>
|
||||
<td>
|
||||
<a href="voir_article.html" class="btn btn-sm btn-outline-secondary">Voir</a>
|
||||
<a href="modifier_article.html" class="btn btn-sm btn-outline-primary">Modifier</a>
|
||||
<button class="btn btn-sm btn-outline-danger" onclick="confirmerSuppression('Mon premier article')">Supprimer</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
7
blog/categories/articles/lister_articles.js
Normal file
7
blog/categories/articles/lister_articles.js
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
function confirmerSuppression(titre) {
|
||||
const confirmation = confirm(`Êtes-vous sûr de vouloir supprimer l'article "${titre}" ?`);
|
||||
if (confirmation) {
|
||||
alert(`L'article "${titre}" a été supprimé.`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user