<!--

    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/>.

-->
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{edition/view}">
    <head>
        <title th:text="|Create session for ${'#' + (ec == null ? edition.id : ec.id)}|"></title>

        <script src="/webjars/momentjs/min/moment.min.js"></script>

        <link rel="stylesheet" href="/webjars/simplemde/dist/simplemde.min.css" />
        <script src="/webjars/simplemde/dist/simplemde.min.js"></script>
    </head>

    <!--@thymesVar id="ec" type="nl.tudelft.labracore.api.dto.EditionCollectionDetailsDTO"-->
    <!--@thymesVar id="edition" type="nl.tudelft.labracore.api.dto.EditionDetailsDTO"-->

    <!--@thymesVar id="dto" type="nl.tudelft.queue.dto.create.labs.LabCreateDTO"-->
    <!--@thymesVar id="lType" type="nl.tudelft.queue.model.enums.QueueSessionType"-->

    <body>
        <section layout:fragment="subcontent">
            <form
                th:with="action = @{/{ou}/{id}/lab/create/{lTy}(id=${ec == null ? edition.id : ec.id}, ou=${ec == null ? 'edition' : 'shared-edition'}, lTy=${lType.name().toLowerCase()})}"
                th:action="${action}"
                th:object="${dto}"
                class="flex vertical"
                method="post"
                id="form">
                <th:block layout:fragment="general-config"></th:block>

                <th:block layout:fragment="slot-config"></th:block>
                <th:block layout:fragment="exam-config"></th:block>
                <th:block layout:fragment="capacity-config"></th:block>
                <th:block layout:fragment="extra-config"></th:block>

                <th:block layout:fragment="advanced-config"></th:block>

                <div>
                    <button type="submit" class="button">Create new lab</button>
                </div>
            </form>
        </section>
    </body>
</html>
