<@_placeMetadata path=path><#assign a=object/></@_placeMetadata>
<@_placeList path=path advanced=true status=status userId=userId startPublishDate=startPublishDate endPublishDate=endPublishDate
    orderField=orderField orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader">
    <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 'place_data.page_size'/>:</label>
                    <label>${(a.size)!} ${(a.allowContribute?then('['+t.pageMessage('allow_contribute')+']',''))!}</label>
                </li>
                <li class="width:auto">
                    <#list 0..2 as s>
                        <label style="width:auto">
                            <input <@t.compare status!'' s?string 'checked="checked"'/> name="status" value="${s}" type="checkbox"/>
                            <@t.page 'status.place.data.'+s/>
                        </label>
                    </#list>
                </li>
                <li>
                    <label><@t.page 'content.promulgator'/>:</label>
                    <#include "../include_page/userId.html"/>
                </li>
                <li>
                    <label><@t.page 'publish_date'/>:</label>
                    <input type="text" name="startPublishDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" value="${startPublishDate!}" />
                    <span>-</span>
                    <input type="text" name="endPublishDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" value="${endPublishDate!}" />
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                    <li>
                        <a class="button" href="cmsPlace/export?path=${(path?url)!}&_csrf=<@_csrfToken admin=true/>" target="dwzExport" targetType="navTab"><i class="icon-download-alt icon-large"></i> <@t.page 'button.export'/></a>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a href="cmsPlace/add.html?path=${(path?url)!}" target="navTab" rel="cmsPlace/add"><i class="icon-plus-sign-alt icon-large"></i> <@t.page 'place_data.add'/></a></li>
            <li><a href="cmsPlace/refresh?_csrf=<@_csrfToken admin=true/>&path=${(path?url)!}" title="<@t.page 'confirm.batch_refresh'/>" target="selectedTodo" rel="ids"><i class="icon-refresh icon-large"></i> <@t.page 'button.batch_refresh'/></a></li>
            <li><a href="cmsPlace/check?_csrf=<@_csrfToken admin=true/>&path=${(path?url)!}" title="<@t.page 'confirm.batch_check'/>" target="selectedTodo" rel="ids"><i class="icon-check icon-large"></i> <@t.page 'button.batch_check'/></a></li>
            <li><a href="cmsPlace/uncheck?_csrf=<@_csrfToken admin=true/>&path=${(path?url)!}" 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 site.useSsi>
                <li class="line">line</li>
                <li><a href="cmsTemplate/publishPlace?path=${(path?url)!}&_csrf=<@_csrfToken admin=true/>" target="ajaxTodo"><i class="icon-file-text-alt icon-large"></i> <@t.page 'button.publish'/></a></li>
            </#if>
            <li class="line">line</li>
            <li><a href="cmsPlace/delete?_csrf=<@_csrfToken admin=true/>&path=${(path?url)!}" title="<@t.page 'confirm.batch_delete'/>" target="selectedTodo" rel="ids"><i class="icon-trash icon-large"></i> <@t.page 'button.batch_delete'/></a></li>
            <li class="line">line</li>
            <li><a href="cmsPlace/clear?path=${(path?url)!}&_csrf=<@_csrfToken admin=true/>" title="<@t.page 'confirm.clear_all'/>" target="ajaxTodo"><i class="icon-wrench icon-large"></i> <@t.page 'button.clear_all'/></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH>
        <thead>
            <tr>
                <th width="20"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th width="30"><@t.page 'id'/></th>
                <th width="150"><@t.page 'title'/></th>
                <th width="70" orderField="publishDate" class="<#if orderField??&&'publishDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'publish_date'/></th>
                <th width="70"><@t.page 'expiry_date'/></th>
                <th width="70" orderField="createDate" class="<#if orderField??&&'createDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'create_date'/></th>
                <th width="60"><@t.page 'content.promulgator'/></th>
                <th width="80" orderField="clicks" class="<#if orderField??&&'clicks'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'clicks'/></th>
                <th width="50"><@t.page 'status'/>/<@t.page 'inspector'/></th>
                <th width="150"><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
    <#list page.list as a>
        <@t.merge 'userIds' a.userId!/>
        <@t.merge 'userIds' a.checkUserId!/>
    </#list>

    <@_sysUser ids=t.userIds!><#assign userMap=map!/></@_sysUser>
    <#list page.list as a>
            <tr target="sid" rel="${a.id}">
                <td><input name="ids" value="${a.id}" type="checkbox"></td>
                <td>${a.id}</td>
                <td><a href="cmsPlace/view.html?id=${a.id}" target="dialog" rel="viewContent${a.id}">${a.title}</a></td>
                <td>${a.publishDate}</td>
                <td>${a.expiryDate!}</td>
                <td>${a.createDate}</td>
                <td>${(userMap[a.userId?string].nickName)!}</td>
                <td>${a.clicks}</td>
                <td>
                    <@t.page 'status.place.data.'+a.status/>
                    <#if 1=a.status&&a.checkUserId?has_content>/ ${(userMap[a.checkUserId?string].nickName)!}</#if>
                </td>
                <td class="wrap">
                    <a href="cmsPlace/add.html?id=${a.id}" class="edit btnText blue" target="navTab" rel="cmsPlace/edit"><i class="icon-edit"></i> <@t.page 'button.edit'/></a>
                    <a href="cmsPlace/add.html?copyId=${a.id}" class="btnText blue" target="navTab" rel="cmsPlace/add" icon="<i class='icon-plus-sign-alt icon-large'></i>" title="<@t.page 'place_data.add'/>"><@t.page 'button.copy'/></a>
                    <#if 2=a.status>
                        <a href="cmsPlace/check?ids=${a.id}&_csrf=<@_csrfToken admin=true/>&path=${(path?url)!}" class="btnText green" title="<@t.page 'confirm.check'/>" target="ajaxTodo"><i class="icon-check"></i> <@t.page 'button.check'/></a>
                    <#elseif 1=a.status>
                        <a href="cmsPlace/uncheck?ids=${a.id}&_csrf=<@_csrfToken admin=true/>&path=${(path?url)!}" class="btnText red" title="<@t.page 'confirm.check'/>" target="ajaxTodo"><i class="icon-eraser"></i> <@t.page 'button.uncheck'/></a>
                    </#if>
                    <a href="cmsPlace/delete?ids=${a.id}&_csrf=<@_csrfToken admin=true/>&path=${(path?url)!}" 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>
    <#include "../include_page/page.html"/>
</div>
</@_placeList>