<@sys.userTokenList userId=admin.id channel=channel orderField=orderField orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'channel'/>:</label>
                    <input type="text" name="channel" value="${(channel)!}"/>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="card">
    <table class="table" width="100%" layoutH orderField="${orderField!}" orderType="${orderType!}">
        <thead>
            <tr>
                <th><@t.page 'channel'/></th>
                <th orderField="createDate"><@t.page 'authorize_date'/></th>
                <th orderField="expiryDate"><@t.page 'expiry_date'/></th>
                <th><@t.page 'log.login_ip'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr>
                <td>${a.channel!}</td>
                <td>${a.createDate!}</td>
                <td>${a.expiryDate!}</td>
                <td>
                    <div class="box">
                        <p>${a.loginIp!}</p>
                        <p>${(getIpRegion(a.loginIp).address)!}</p>
                    </div>
                </td>
                <td class="wrap">
                    <a href="sysUserToken/delete?authToken=${a.authToken}&_csrf=<@tools.csrfToken admin=true/>" class="btnText warn" title="<@t.page 'confirm.delete'/>" target="ajaxTodo"><i class="icon-trash"></i><@t.page 'button.delete'/></a>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <script>
        $('table>tbody>tr[rel="<@tools.csrfToken admin=true/>"]>td:eq(0)',navTab.getCurrentPanel()).append('[<@t.page 'current_token'/>]');
        $('table>tbody>tr[rel="<@tools.csrfToken/>"]>td:eq(0)',navTab.getCurrentPanel()).append('[<@t.page 'current_token'/>]');
    </script>
    <#include "../include_page/page.html"/>
</div>
</@sys.userTokenList>