<html xmlns:th="http://www.thymeleaf.org" xmlns:tiles="http://www.thymeleaf.org">
  <head>
    <title tiles:fragment="title">Messages : View All</title>
  </head>
  <body>
    <div tiles:fragment="content">
        <h1>Inbox</h1>
        <table class="table table-bordered table-striped">
            <thead>
                <tr>
                    <th>Created</th>
                    <th>Summary</th>
                    <th>Delete</th>
                </tr>
            </thead>
            <tbody>
                <tr th:if="${messages.empty}">
                    <td colspan="2">No messages</td>
                  </tr>
                  <tr th:each="message : ${messages}">
                    <td th:text="${#calendars.format(message.created)}">July 11, 2012 2:17:16 PM CDT</td>
                    <td><a href="view.html" th:href="@{'/' + ${message.id}}" th:text="${message.summary}">The summary</a></td>
                    <td><form class="form-inline" th:action="@{'/' + ${message.id}}" th:method="delete"><input type="submit" value="Delete"/></form></td>
                </tr>
            </tbody>
        </table>
    </div>
  </body>
</html>