summaryrefslogtreecommitdiff
path: root/spring-boot/10-role-based-security/src/main/resources/templates/security/users.html
blob: 81752c8e2ee74b197d5cb4ab687c42d4e38bb5b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
    th:replace="~{layout/main :: layout(title='Users', content=~{::main})}">

<body>
    <main>
        <table>
        <thead>
            <tr>
                <th>ID</th>
                <th>Username</th>
                <th>Description</th>
                <th>Edit</th>
            </tr>
        </thead>
        <tbody>
            <!-- th:each loops over the "userss" list sent by the controller -->
            <tr th:each="user : ${users}">
                <!-- th:text updates the cell contents dynamically -->
                <td th:text="${user.id}">1</td>
                <td th:text="${user.username}">Username</td>
                <td th:text="${user.description}">User description</td>
                <td><a th:href="@{/security/user/update/{id}(id=${user.id})}">Edit</a></td>
            </tr>
        </tbody>
    </table>
    </main>
</body>

</html>