<!DOCTYPE html>

<!--
  ~ Copyright (c) 2025 Andrew Grant of Carrick Software .
  ~ All rights reserved.
  -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>People </title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>
<div th:insert="~{fragments/layout::banner}"></div>


<div class="container text-center">
    <!--/*@thymesVar id="birthCertificate" type="scot.carricksoftware.grants.domains.certificates.BirthCertificate"*/-->
    <!--/*@thymesVar id="person" type="scot.carricksoftware.grants.domains.people.Person"*/-->
    <h3>Divorce Certificates</h3>
    <table class="table table-striped table-bordered">
        <thead class="table-dark">
        <tr>
            <th>ID</th>
            <th>First Party</th>
            <th>Second Party</th>
            <th></th>
        </tr>
        </thead>

        <tr th:each="certificate   : ${divorceCertificates}">

            <td th:text="${certificate.id}">123</td>
            <td th:text="${certificate.firstParty.toString()}">123</td>
            <td th:text="${certificate.secondParty.toString()}">123</td>
            <td><span>
                        <a th:action="delete" class="btn btn-danger btn-sm" href=""
                           th:href="@{'/divorceCertificate/' + ${certificate.id} + '/delete'}"
                           th:text="Delete"></a>
                    <a th:action="edit" class="btn btn-warning btn-sm"
                       th:href="@{'/divorceCertificate/' + ${certificate.id} + '/edit'}"
                       th:text="Edit"></a>
                    </span></td>
        </tr>
        <tfoot>
        <tr>
            <td colspan="4"><span>
                        <a th:action="rewind" class="btn btn-secondary btn-sm" th:href="@{/divorceCertificates/rewind}"
                           th:text="'<<'"></a>
                         <a th:action="back" class="btn btn-secondary btn-sm"
                            th:href="@{/divorceCertificates/prev}" th:text="'<'"></a>
                         <a th:action="new" class="btn btn-primary btn-sm" th:href="@{/divorceCertificate/new}"
                            th:text="'New Certificate'"></a>
                         <a th:action="home" class="btn btn-success btn-sm"
                            th:href="@{/}" th:text="'Home'"></a>
                         <a th:action="forward" class="btn btn-secondary btn-sm"
                            th:href="@{/divorceCertificates/next}" th:text="'>'"></a>
                         <a th:action="end" class="btn btn-secondary btn-sm" th:href="@{/divorceCertificates/ff}"
                            th:text="'>>'"></a>
                        </span></td>
        </tr>
        </tfoot>
    </table>
</div>
</body>
</html>

