───────┬────────────────────────────────────────────────────────────────────────
       File: src/main/resources/templates/list.html
───────┼────────────────────────────────────────────────────────────────────────
   1    <!DOCTYPE html>
   2    <html lang="ja" xmlns:th="http://www.thymeleaf.org">
   3    
   4    <head>
   5        <meta charset="UTF-8">
   6        <title>ToDoList</title>
   7    </head>
   8    
   9    <body>
  10        <h1> ようこそ [[${member.name}]] さん!</h1>
  11        <p>
  12            <a th:href="@{/{mid}/todos/all(mid=${member.mid})}">みんなのToDo</a>
  13            <a th:href="@{/}">ログアウト</a>
  14        </p>
  15        <h2>ToDo</h2>
  16        <table border="1">
  17            <tr>
  18                <th>#</th>
  19                <th>タイトル</th>
  20                <th>作成日時</th>
  21                <th>コマンド</th>
  22            </tr>
  23            <tr th:each="todo: ${todos}">
  24                <td>[[${todo.seq}]]</td>
  25                <td>[[${todo.title}]]</td>
  26                <td>[[${todo.createdAt}]]</td>
  27                <td>
  28                    <a th:href="@{/{mid}/todos/{seq}/done(mid=${member.mid},seq=${todo.seq})}">完了</a>
  29                </td>
  30            </tr>
  31            <tr>
  32                <td>
  33                    *
  34                </td>
  35                <td colspan="3">
  36                    <form role="form" th:action="@{/{mid}/todos(mid=${member.mid})}" th:object="${ToDoForm}" method="post">
  37                        <input type="text" required th:field="*{title}" />
  38                        <input type="submit" value="新規作成" />
  39                        <div th:if="${#fields.hasErrors('title')}" th:errors="*{title}" style="color: red"></div>
  40                    </form>
  41                </td>
  42            </tr>
  43        </table>
  44    
  45        <h2>Done</h2>
  46        <table border="1">
  47            <tr>
  48                <th>#</th>
  49                <th>タイトル</th>
  50                <th>作成日時</th>
  51                <th>完了日時</th>
  52            </tr>
  53            <tr th:each="done: ${dones}">
  54                <td>[[${done.seq}]]</td>
  55                <td>[[${done.title}]]</td>
  56                <td>[[${done.createdAt}]]</td>
  57                <td>[[${done.doneAt}]]</td>
  58            </tr>
  59        </table>
  60    
  61    </body>
  62    
  63    </html>
───────┴────────────────────────────────────────────────────────────────────────