<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
    <head>
        <title th:text="#{task.get.title(${task.description})}"></title>
        <link rel="stylesheet" type="text/css" href="/public/css/base.css">
        <link rel="stylesheet" type="text/css" th:href="${#themes.code('stylesheet')}">
    </head>
    <body>
        <h2 th:text="#{task.get.header(${id})}"></h2>
        <p th:text="${task.due}"></p>
        <p th:text="${task.description}"></p>
        <hr/>
        <p th:text="#{task.get.attachments}"></p>
        <dl th:each="attachment : ${task.attachments}">
            <dt><img src="#" th:src="@{/attachments/{id}(id=${attachment.id})}"></dt>
            <dt>
                <span th:text="${attachment.name}"></span>
                <a class="button" th:href="@{/attachments/{id}(id=${attachment.id},download=true)}"
                   th:text="#{task.get.download}"></a>
            </dt>
            <dd th:text="${attachment.description}"></dd>
        </dl>
        <p>
            <a th:href="@{/tasks/{username}/list(username=${username})}" th:text="#{task.get.list}"></a>
            <a th:href="@{/tasks/{username}/get/{id}/attach(username=${username},id=${id})}" th:text="#{task.get.attach}"></a>
        </p>
    </body>
</html>
