<!DOCTYPE html>
<html lang="de" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Flexinale - Kino &Uuml;bersicht</title>
    <link href="icons/movies.png" rel="icon">
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
    <link href="../static/css/vendor/picnic.min.css"
          media="screen" rel="stylesheet" th:href="@{css/vendor/picnic.min.css}"/>
    <link href="../static/css/app/main.css"
          media="screen" rel="stylesheet" th:href="@{css/app/main.css}"/>
</head>
<body>

<div th:replace="~{header}"/>

<div class="container" th:if="${#lists.isEmpty(kinos)}">
    <h1>Kino-Liste ist leer!</h1>
</div>

<div class="container" th:if="${not #lists.isEmpty(kinos)}">
    <h1>Kino-Liste</h1>
    <table class="FLEXlist">
        <tr>
            <th class="FLEXstring">Name</th>
            <th class="FLEXstring">Adresse</th>
            <th class="FLEXstring">Anzahl S&auml;le</th>
        </tr>
        <tr th:each="kino : ${kinos}">
            <td>
                <a th:href="@{kino/{id}(id=${kino.id.id()})}">
                    <th:block th:text="${kino.name}"/>
                </a>
            </td>
            <td>
                <th:block th:text="${kino.adresse}"/>
            </td>
            <td>
                <th:block th:text="${kino.kinoSaele.size()}"/>
            </td>
        </tr>
    </table>
</div>
</body>
</html>
