1 | <!DOCTYPE html>
|
---|
2 | <html lang="en" xmlns:th="http://www.thymeleaf.org">
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <title>Task Page</title>
|
---|
6 | <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"
|
---|
7 | integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
|
---|
8 | <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"
|
---|
9 | integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz"
|
---|
10 | crossorigin="anonymous"></script>
|
---|
11 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
---|
12 | </head>
|
---|
13 | <body>
|
---|
14 |
|
---|
15 | <div th:insert="layout/navbar.html :: navbar"></div>
|
---|
16 |
|
---|
17 | <br>
|
---|
18 |
|
---|
19 | <table class="table table-striped">
|
---|
20 | <thead>
|
---|
21 | <tr>
|
---|
22 | <th scope="col">#</th>
|
---|
23 | <th scope="col">Task Name</th>
|
---|
24 | <th scope="col">Task Description</th>
|
---|
25 | <th scope="col">Priority</th>
|
---|
26 | <th scope="col">Done</th>
|
---|
27 | <th scope="col">Action #1</th>
|
---|
28 | <th scope="col">Action #2</th>
|
---|
29 | </tr>
|
---|
30 | </thead>
|
---|
31 | <tbody>
|
---|
32 | <tr th:each="task,num : ${tasks}">
|
---|
33 | <th th:text="${num.count}" scope="row"></th>
|
---|
34 | <td th:text="${task.name}"></td>
|
---|
35 | <td th:text="${task.description}"></td>
|
---|
36 | <td th:text="${task.priority}"></td>
|
---|
37 | <td th:text="${task.isDone}"></td>
|
---|
38 | <td>
|
---|
39 | <form method="post" th:action="@{'/finish/task/{id}' (id = ${task.id})}" th:if="${task.isDone == false}">
|
---|
40 | <button type="submit" class="btn btn-danger">Finish</button>
|
---|
41 | </form>
|
---|
42 | </td>
|
---|
43 | <td>
|
---|
44 | <form method="post" th:action="@{'/delete/task/{id}' (id = ${task.id})}" >
|
---|
45 | <button type="submit" class="btn btn-danger">Delete</button>
|
---|
46 | </form>
|
---|
47 | </td>
|
---|
48 | </tr>
|
---|
49 |
|
---|
50 | </tbody>
|
---|
51 | </table>
|
---|
52 |
|
---|
53 | </body>
|
---|
54 | </html> |
---|