<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      xmlns:yq="http://www.yqboots.com" xmlns="http://www.w3.org/1999/xhtml" layout:decorator="layouts/layout">
<head>
  <title th:text="#{SEC0043}">Session Management</title>
</head>
<body>
<div layout:fragment="breadcrumbs">
  <yq:breadcrumbs menu="SECURITY_SESSION"/>
</div>
<div class="content content-sm height-600" layout:fragment="content">
  <div class="container">
    <yq:alert level="danger"/>
    <div class="row">
      <div class="col-md-12">
        <form action="#" th:action="@{/security/session}" th:object="${searchForm}" method="post">
          <div class="input-group">
            <input class="form-control" type="text" th:field="*{criterion}"/>
            <span class="input-group-btn">
                <button class="btn-u" type="submit"><i class="glyphicon glyphicon-search"></i></button>
            </span>
          </div>
        </form>
      </div>
    </div>
    <div class="divider divider-blank"></div>
    <div class="panel">
      <table class="table table-hover table-responsive">
        <thead>
        <tr>
          <th th:text="#{SEC0003}">Username</th>
          <th th:text="#{SEC0044}">Session ID</th>
          <th th:text="#{SEC0045}">Last Request</th>
          <th th:text="#{SEC0046}">Expired?</th>
          <th>&nbsp;</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="item : ${page}">
          <td th:text="${item.principal.username}">NAME 1</td>
          <td th:text="${item.sessionId}">1</td>
          <td th:text="${item.lastRequest}">2016-11-15 20:30:30.000</td>
          <td th:text="${item.expired}">true</td>
          <td>
            <a th:href="@{/security/session(id=${item.sessionId},action='delete')}" th:title="#{SEC0019}">
              <i class="glyphicon glyphicon-remove-sign"></i>
            </a>
          </td>
        </tr>
        </tbody>
        <tfoot>
        <tr>
          <th colspan="8">
            <div yq:pageSummary="${page}"></div>
          </th>
        </tr>
        </tfoot>
      </table>
      <div class="panel-footer text-center">
        <yq:pagination page="${page}" th:href="@{/security/session}"/>
      </div>
    </div>
  </div>
</div>
</body>
</html>