<@cms.commentList advanced=true replaceSensitive=false userId=userId contentId=contentId status=status disabled=disabled
            orderField=orderField orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader card">
    <form class="pagerForm" action="cmsComment/list.html" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar"<@cms.commentList advanced=true status=2 pageSize=0> data-todo="${(page.totalCount gt 0)?then(page.totalCount,'')}" data-todo-type="comment_list"</@cms.commentList>>
            <ul class="searchContent">
                <li>
                    <label><@t.page 'content.promulgator'/>:</label>
                    <#include "../include_page/userId.html"/>
                </li>
                <li>
                    <label><@t.page 'content.id'/>:</label>
                    <input type="text" name="contentId" value="${contentId!}"/>
                </li>
                <li>
                <#list 1..2 as s>
                    <label>
                        <input <@t.compare status s?string 'checked="checked"'/> name="status" value="${s}" type="checkbox" class="form-check-input"/>
                        <@t.page 'status.content.'+s/>
                    </label>
                </#list>
                </li>
                <#include "../include_page/disabled.html"/>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<@sys.authorized roleIds=admin.roles urls='cmsComment/edit,cmsComment/check,cmsComment/uncheck,cmsComment/delete,cmsComment/reply'><#assign authorizedMap=map/></@sys.authorized>
<div class="card">
    <div class="panelBar">
        <ul class="toolBar">
        <#if authorizedMap['cmsComment/check']>
            <li><a href="cmsComment/check?_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.batch_check'/>" target="selectedTodo" rel="ids"><i class="icon-check icon-large"></i><@t.page 'button.batch_check'/></a></li>
        </#if>
        <#if authorizedMap['cmsComment/uncheck']>
            <li><a href="cmsComment/uncheck?_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.batch_uncheck'/>" target="selectedTodo" rel="ids"><i class="icon-check icon-large"></i><@t.page 'button.batch_uncheck'/></a></li>
        </#if>
        <#if authorizedMap['cmsComment/delete']>
            <li><a href="cmsComment/delete?_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.batch_delete'/>" target="selectedTodo" rel="ids"><i class="icon-trash icon-large"></i><@t.page 'button.batch_delete'/></a></li>
        </#if>
        </ul>
    </div>
    <table class="table" width="100%" layoutH orderField="${orderField!}" orderType="${orderType!}">
        <thead>
            <tr>
                <th width="20"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th><@t.page 'content.promulgator'/></th>
                <th width="150"><@t.page 'content'/></th>
                <th><@t.page 'comment'/></th>
                <th orderField="createDate"><@t.page 'create_date'/></th>
                <th width="30" orderField="scores"><@t.page 'content.score'/></th>
                <th width="30" orderField="replies"><@t.page 'replies'/></th>
                <th orderField="updateDate"><@t.page 'modified_date'/></th>
                <th><@t.page 'status'/>/<@t.page 'inspector'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'userIds' a.userId!/>
                <@t.merge 'userIds' a.checkUserId!/>
                <@t.merge 'contentIds' a.contentId!/>
            </#list>
            <@sys.user ids=t.userIds!><#assign userMap=map!/></@sys.user>
            <@cms.content ids=t.contentIds!><#assign contentMap=map!/></@cms.content>
            <#list page.list as a>
            <tr>
                <td class="center"><input name="ids" value="${a.id}" type="checkbox"></td>
                <td>
                    <div class="box">
                        <p class="center exclude-translate">${(userMap[a.userId?string].nickname)!}</p>
                        <p>${a.ip!}</p>
                        <p>${(getIpRegion(a.ip).address)!}</p>
                    </div>
                </td>
                <td class="exclude-translate">
                    <a href="cmsContent/view.html?id=${a.contentId}" target="dialog" width="1200" height="600" rel="viewContent${a.contentId}">${(contentMap[a.contentId?string].title)!}</a>
                </td>
                <td><textarea rows="3" cols="50">${a.text!}</textarea></td>
                <td>${a.createDate!}</td>
                <td>${a.scores!}</td>
                <td>${a.replies!}</td>
                <td>${a.updateDate!}</td>
                <td>
                    <span class="statusText ${a.status?switch(1,'green',2,'orange','')}"><@t.page 'status.content.'+a.status/></span>
                    <#if 1=a.status><p>${(userMap[a.checkUserId?string].nickname)!}</p></#if>
                </td>
                <td class="wrap">
                <#if !a.disabled>
                    <#if authorizedMap['cmsComment/edit']>
                        <a href="cmsComment/edit.html?id=${a.id}" class="edit btnText blue" target="dialog" mask="true"><i class="icon-edit"></i><@t.page 'button.edit'/></a>
                    </#if>
                    <#if authorizedMap['cmsComment/reply']>
                        <a href="cmsComment/reply.html?replyId=${a.replyId!a.id}" class="btnText blue" target="dialog" mask="true"><i class="icon-reply"></i><@t.page 'reply'/></a>
                    </#if>
                    <#if 1=a.status>
                        <#if authorizedMap['cmsComment/uncheck']>
                            <a href="cmsComment/uncheck?ids=${a.id}&_csrf=<@tools.csrfToken admin=true/>" class="btnText red" title="<@t.page 'confirm.uncheck'/>" target="ajaxTodo"><i class="icon-eraser"></i><@t.page 'button.uncheck'/></a>
                        </#if>
                    <#else>
                        <#if authorizedMap['cmsComment/check']>
                            <a href="cmsComment/check?ids=${a.id}&_csrf=<@tools.csrfToken admin=true/>" class="btnText green" title="<@t.page 'confirm.check'/>" target="ajaxTodo"><i class="icon-check"></i><@t.page 'button.check'/></a>
                        </#if>
                    </#if>
                    <#if authorizedMap['cmsComment/delete']>
                        <a href="cmsComment/delete?ids=${a.id}&_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>
                    </#if>
                </#if>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</@cms.commentList>
</div>