<!--

    Queue - A Queueing system that can be used to handle labs in higher education
    Copyright (C) 2016-2020  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/>.

-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <!--@thymesVar id="qSession" type="nl.tudelft.queue.dto.view.labs.ExamLabViewDTO"-->

    <body>
        <th:block th:fragment="exam-lab-info">
            <div class="surface p-0">
                <h3 class="surface__header">Time Slot info</h3>
                <div class="surface__content">
                    <dl>
                        <dt class="fw-500">Slot selection opens at</dt>
                        <dd th:text="${#temporals.format(qSession.slottedLabConfig.selectionOpensAt, 'dd MMMM yyyy HH:mm')}"></dd>

                        <dt class="fw-500 mt-3">Capacity</dt>
                        <dd th:text="|${qSession.slottedLabConfig.capacity} requests per slot|"></dd>

                        <dt class="fw-500 mt-3">Time Slot duration</dt>
                        <dd th:text="|${qSession.slottedLabConfig.duration} minutes per slot|"></dd>

                        <dt class="fw-500 mt-3">Minimum Exam lab Percentage</dt>
                        <dd th:text="${qSession.examLabConfig.percentage + '%'}"></dd>
                        <th:block th:if="${@permissionService.canManageSession(qSession.data)}">
                            <dt class="fw-500 mt-3">Progress</dt>
                            <dd>
                                <div class="progress">
                                    <div class="progress-bar bg-success" th:styleappend="|width: ${qSession.percentageHandled}%|"></div>
                                </div>
                            </dd>
                            <dd
                                th:text="|Handled ${qSession.totalHandled} out of
                            ${qSession.totalNeeded} required students|"></dd>
                        </th:block>
                    </dl>
                </div>
            </div>
        </th:block>
    </body>
</html>
