<!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">
                <div class="d-flex align-items-center justify-content-between mb-4">
                    <h1 class="mb-4" th:text="${titlePage}"></h1>
                    <a th:href="@{/cpr/emission}" type="button" class="btn btn-outline-dark" title="Novo">
                        <i class="bi bi-plus-square"></i>
                    </a>
                </div>
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>Código</th>
                        <th>Razão Social do Emissor</th>
                        <th>Local de Emissão</th>
                        <th>Data da Entrega</th>
                        <th>Tipo</th>
                        <th>Ações</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="object : ${cprEmissions}">
                        <td th:text="${object.id}">0</td>
                        <td th:text="${object.razaoSocialEmissor}">0</td>
                        <td th:text="${object.localEmissao}">0</td>
                        <td th:text="${#temporals.format(object.dataEntrega, 'dd/MM/yyyy')}">0</td>
                        <td th:text="${object.tipoCpr}">0</td>
                        <td>
                            <a th:href="@{'/cpr/register/edit/' + ${object.id}}" type="button" class="btn btn-outline-dark"
                               title="Editar">
                                <i class="bi bi-pencil-square"></i>
                            </a>
                            <a th:href="@{'/cpr/register/remove/' + ${object.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>
