<!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">
    <div class="container border border-info
                    rounded-3 text-center p-4">
        <h3> Person Images</h3>
        <table class="table table-striped table-bordered">
            <thead class="table-dark">
            <tr>
                <th>ID</th>
                <th>Person</th>
                <th></th>
                <th></th>
            </tr>
            </thead>

            <tr th:each="image : ${personImages}">
                <!--/*@thymesVar id="person" type="scot.carricksoftware.grants.domains.people.Person"*/-->
                <td th:text="${image.id}">123</td>
                <td th:text="${image.person.toString()}">123</td>
                <td></td>
                <td><span>
                        <a th:action="delete" class="btn btn-danger btn-sm" href=""
                           th:href="'personImage/' + ${image.id} + '/delete'"
                           th:text="Delete"></a>
                    <a th:action="edit" class="btn btn-warning btn-sm"
                       th:href="'personImage/' + ${image.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="@{/personImages/rewind}"
                           th:text="'<<'"></a>
                         <a th:action="back" class="btn btn-secondary btn-sm"
                            th:href="@{/personImages/prev}" th:text="'<'"></a>
                         <a th:action="new" class="btn btn-primary btn-sm" th:href="@{/personImage/new}"
                            th:text="'New Person Image'"></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="@{/personImages/next}" th:text="'>'"></a>
                         <a th:action="end" class="btn btn-secondary btn-sm" th:href="@{/personImages/ff}"
                            th:text="'>>'"></a>
                        </span></td>
            </tr>
            </tfoot>
        </table>
    </div>
</div>
</body>
</html>

