<@sys.userList deptId=deptId startRegisteredDate=startRegisteredDate endRegisteredDate=endRegisteredDate startLastLoginDate=startLastLoginDate endLastLoginDate=endLastLoginDate
            superuser=superuser emailChecked=emailChecked name=name disable=false
            orderField=orderField orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm" action="sysUser/lookup_list.html" autocomplete="off" onsubmit="return divSearch(this, 'user_list');" method="post">
        <#include "../include_page/parameters.html"/>
        <input type="hidden" name="field" value="${field!'userId'}"/>
        <input type="hidden" name="nicknameField" value="${nicknameField!'nickname'}"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'name'/>:</label>
                    <input type="text" name="name" value="${(name)!}"/>
                </li>
                <li>
                    <select class="combox" name="superuser">
                        <option value><@t.page 'user.type'/></option>
                        <option value="false"${(superuser?has_content&&"false"=superuser)?then(' selected="true"','')?no_esc}><@t.page 'user.general'/></option>
                        <option value="true"${(superuser?has_content&&"true"=superuser)?then(' selected="true"','')?no_esc}><@t.page 'admin'/></option>
                    </select>
                </li>
                <li>
                    <select class="combox" name="emailChecked">
                        <option value><@t.page 'email.verification_status'/></option>
                        <option value="false"${(emailChecked?has_content&&"false"=emailChecked)?then(' selected="true"','')?no_esc}><@t.page 'unverified'/></option>
                        <option value="true"${(emailChecked?has_content&&"true"=emailChecked)?then(' selected="true"','')?no_esc}><@t.page 'verified'/></option>
                    </select>
                </li>
                <li>
                    <label><@t.page 'user.register_date'/>:</label>
                    <input type="text" name="startRegisteredDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startRegisteredDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                    <span>-</span>
                    <input type="text" name="endRegisteredDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endRegisteredDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </li>
                <li>
                    <label><@t.page 'user.last_login_date'/>:</label>
                    <input type="text" name="startLastLoginDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startLastLoginDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                    <span>-</span>
                    <input type="text" name="endLastLoginDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endLastLoginDate!}"/>
                    <a class="inputDateButton" href="javascript:void(0);"></a>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="button" class="button" onclick="$.bringBack({'${field!'userId'}':'','${nicknameField!'nickname'}':''});return false;"><@t.page 'button.clear_select'/></button>
                    </li>
                    <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 targetType="ajax"  orderField="${orderField!}" orderType="${orderType!}" rel="user_list">
        <thead>
            <tr>
                <th><@t.page 'user.select'/></th>
                <th width="200"><@t.page 'user.username'/>/<@t.page 'user.nickname'/></th>
                <th><@t.page 'dept'/></th>
                <th><@t.page 'email'/></th>
                <th orderField="lastLoginDate"><@t.page 'user.last_login_date'/></th>
                <th orderField="loginCount"><@t.page 'user.login_count'/></th>
                <th orderField="registeredDate"><@t.page 'user.register_date'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'deptIds' a.deptId!/>
            </#list>
            
            <@sys.dept ids=t.deptIds!><#assign deptMap=map!/></@sys.dept>
            <#list page.list as a>
            <tr>
                <td>
                    <a href="javascript:;" onclick="$.bringBack({'${field!'userId'}':'${a.id}','${nicknameField!'nickname'}':'${(a.nickname?js_string)!}'});return false;"><i class="icon-ok icon-large"></i><@t.page 'select'/></a>
                </td>
                <td class="wrap">
                    <#if a.cover?has_content>
                        <div class="thumbnail">
                            <img src="${a.cover!}"/>
                        </div>
                    </#if>
                    <div class="box">
                        <p class="exclude-translate"><@t.page 'user.username'/>:${(a.name)!}</p>
                        <p class="exclude-translate"><@t.page 'user.nickname'/>:${(a.nickname)!}</p>
                        <p>${(a.superuser)?then('[<font color="red">'+t.pageMessage('admin')+'</font>]','')?no_esc} <font color="red"><@t.page 'user.content_permissions.'+a.contentPermissions/></font></p>
                    </div>
                </td>
                <td class="exclude-translate">${(deptMap[a.deptId?string].name)!}</td>
                <td>
                    <div class="box">
                        <p class="exclude-translate">${(a.email)!}</p>
                        <p>${a.emailChecked?then('[<font color="red">'+t.pageMessage('verified')+'</font>]','['+t.pageMessage('unverified')+']')?no_esc}</p>
                    </div>
                </td>
                <td>
                    <div class="box">
                        <p>${a.lastLoginDate!}</p>
                        <p><@t.page 'log.login_ip'/>:${a.lastLoginIp!}</p>
                    </div>
                </td>
                <td>${a.loginCount!}</td>
                <td>${a.registeredDate!}</td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#assign rel='user_list'/>
    <#include "../include_page/pageDialog.html"/>
</div>
</@sys.userList>