<!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>Fornecedor</th>
                        <th>Ações</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="compra : ${compras}">
                        <td th:text="${compra.id}">0</td>
                        <td th:text="${compra.fornecedor}">0</td>
                        <td>
                            <a th:href="@{'/compra/editar/' + ${compra.id}}" type="button" class="btn btn-outline-dark"
                               title="Editar">
                                <i class="bi bi-pencil-square"></i>
                            </a>
                            <a th:href="@{'/compra/remover/' + ${compra.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>
