<!DOCTYPE html>
<html lang="de" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Flexinale - Film &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(filme)}">
    <h1>Film-Programm ist leer!</h1>
</div>

<div class="container" th:if="${not #lists.isEmpty(filme)}">
    <h1>Film-Programm</h1>
    <table class="FLEXlist">
        <tr>
            <th class="FLEXstring">Titel</th>
            <th class="FLEXlink">Link</th>
        </tr>
        <tr th:each="film : ${filme}">
            <td>
                <a th:href="@{film/{id}(id=${film.id.id()})}">
                    <th:block th:text="${film.titel.raw()}"/>
                </a>
            </td>
            <td th:if="${film.imdbUrl.raw() != null}">
                <a target="_blank" th:href="${film.imdbUrl.raw()}">IMDB Link</a>
            </td>
        </tr>
    </table>
</div>

</body>
</html>
