|
Last change
on this file was 5ea00d7, checked in by Malek Alavi <malekalavi7@…>, 4 days ago |
|
Initial project upload
|
-
Property mode
set to
100644
|
|
File size:
1.6 KB
|
| Line | |
|---|
| 1 | <!DOCTYPE html>
|
|---|
| 2 | <html xmlns:th="http://www.thymeleaf.org">
|
|---|
| 3 | <head>
|
|---|
| 4 | <meta charset="UTF-8">
|
|---|
| 5 | <title>Categories</title>
|
|---|
| 6 | <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
|---|
| 7 | </head>
|
|---|
| 8 | <body>
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 | <div class="container mt-5">
|
|---|
| 12 | <div class="d-flex justify-content-between align-items-center mb-3">
|
|---|
| 13 | <h2>Categories</h2>
|
|---|
| 14 | <a href="/add/category" class="btn btn-primary">Add Category</a>
|
|---|
| 15 | </div>
|
|---|
| 16 |
|
|---|
| 17 | <div class="mb-3">
|
|---|
| 18 | <a href="/" class="btn btn-secondary">← Back to Home</a>
|
|---|
| 19 | </div>
|
|---|
| 20 |
|
|---|
| 21 | <table class="table table-striped">
|
|---|
| 22 | <thead class="table-dark">
|
|---|
| 23 | <tr>
|
|---|
| 24 | <th>ID</th>
|
|---|
| 25 | <th>Name</th>
|
|---|
| 26 | <th>Description</th>
|
|---|
| 27 | <th>Actions</th>
|
|---|
| 28 | </tr>
|
|---|
| 29 | </thead>
|
|---|
| 30 | <tbody>
|
|---|
| 31 | <tr th:each="category : ${categories}">
|
|---|
| 32 | <td th:text="${category.categoryId}">1</td>
|
|---|
| 33 | <td th:text="${category.name}">Category Name</td>
|
|---|
| 34 | <td th:text="${category.description}">Description</td>
|
|---|
| 35 | <td>
|
|---|
| 36 | <a th:href="@{/edit/category/{id}(id=${category.categoryId})}" class="btn btn-sm btn-warning">Edit</a>
|
|---|
| 37 | <form th:action="@{/delete/category/{id}(id=${category.categoryId})}" method="post" class="d-inline">
|
|---|
| 38 | <button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure?')">Delete</button>
|
|---|
| 39 | </form>
|
|---|
| 40 | </td>
|
|---|
| 41 | </tr>
|
|---|
| 42 | </tbody>
|
|---|
| 43 | </table>
|
|---|
| 44 | </div>
|
|---|
| 45 |
|
|---|
| 46 | <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|---|
| 47 | </body>
|
|---|
| 48 | </html>
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.