<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{fragments/head :: head}">
    <meta charset="UTF-8">
    <title>Too Easy</title>
</head>
<body>
<div th:replace="~{layout}">
    <div th:fragment="content">
        <section>
            <div class="container p-4 shadow bg-white rounded">
                <h1 class="mb-4" th:text="${titulo}"></h1>
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>Código</th>
                        <th>Nome</th>
                        <th>Previlégio</th>
                        <th>Ações</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="user : ${users}">
                        <td th:text="${user.id}"></td>
                        <td th:text="${user.nome}"></td>
                        <td th:text="${user.role}">
                            sel
                        </td>
                        <td>
                            <a th:href="@{'/user/editar/' + ${user.id}}" type="button" class="btn btn-outline-dark"
                               title="Editar">
                                <i class="bi bi-pencil-square"></i>
                            </a>
                            <a th:href="@{'/user/remover/' + ${user.id}}" type="button" class="btn btn-outline-dark"
                               title="Remover">
                                <i class="bi bi-dash-square"></i>
                            </a>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </section>
    </div>
</div>
</body>
</html>
