<!--

    Queue - A Queueing system that can be used to handle labs in higher education
    Copyright (C) 2016-2024  Delft University of Technology

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{container}">
    <!--@thymesVar id="edition" type="nl.tudelft.labracore.api.dto.EditionDetailsDTO"-->
    <!--@thymesVar id="student" type="nl.tudelft.labracore.api.dto.PersonDetailsDTO"-->
    <!--@thymesVar id="requests" type="org.springframework.data.domain.Page<nl.tudelft.queue.model.LabRequest>"-->
    <head>
        <link rel="stylesheet" href="/css/request_colours.css" />
    </head>

    <body>
        <section layout:fragment="content">
            <nav role="navigation" class="breadcrumbs mb-5">
                <a th:href="@{/}">Home</a>
                <span>&gt;</span>
                <a th:href="@{/history/edition/{editionId}/student/{studentId}(editionId=${edition.id}, studentId=${student.id})}">History</a>
            </nav>

            <div class="page-header">
                <h1 class="font-800 mb-5">
                    Requests of
                    <span th:text="${student.displayName}"></span>
                </h1>
            </div>

            <th:block
                th:replace="~{request/list/filters :: filters (returnPath=@{/history/course/{editionId}/student/{studentId}(editionId=${edition.id}, studentId=${student.id})}, multipleLabs=${true})}"></th:block>

            <div class="row mx-xl-5 mx-sm-3">
                <th:block th:replace="~{request/list/request-table :: request-table(showName=true, showOnlyRelevant=${false})}"></th:block>
            </div>

            <div class="row mx-xl-5 mx-sm-3">
                <th:block th:replace="~{pagination :: pagination (page=${requests}, size=3)}"></th:block>
            </div>
        </section>
    </body>
</html>
