<@_contentList advanced=true status=1 endPublishDate=.now categoryId=categoryId modelId=modelId title=title
    parentId=parentId containChild=true userId=userId startPublishDate=startPublishDate 
    orderField=orderField orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader">
    <form class="pagerForm" autocomplete="off" action="cmsPlace/lookup_content_list.html" onsubmit="return divSearch(this, 'lookup_content_list');" method="post">
        <#include "../include_page/parameters.html"/>
        <input type="hidden" name="userId" value="${userId!}"/>
        <input type="hidden" name="categoryId" value="${categoryId!}"/>
        <input type="hidden" name="parentId" value="${parentId!}"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'model'/>:</label>
                    <#include "../include_page/modelId.html"/>
                </li>
                <li>
                    <label><@t.page 'publish_date'/>:</label>
                    <input type="text" name="startPublishDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startPublishDate!}" />
                    <span>-</span>
                    <input type="text" name="endPublishDate" class="date" size="10" autocomplete="off" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endPublishDate!}" />
                </li>
                <li>
                    <label><@t.page 'title'/>:</label>
                    <input type="text" size="40" name="title" value="${title!}" />
                </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="pageContent">
    <table class="table" width="100%" layoutH rel="lookup_content_list">
        <thead>
            <tr>
                <th width="20"><@t.page 'use'/></th>
                <th width="20"><@t.page 'id'/></th>
                <th width="200"><@t.page 'content'/></th>
                <th width="30" orderField="scores" class="<#if orderField??&&'scores'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'content.score'/></th>
                <th width="30" orderField="comments" class="<#if orderField??&&'comments'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'content.comments'/></th>
                <th width="30" orderField="clicks" class="<#if orderField??&&'clicks'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'clicks'/></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>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'userIds' a.userId!/>
                <@t.merge 'userIds' a.checkUserId!/>
                <@t.merge 'categoryIds' a.categoryId!/>
                <@t.merge 'modelIds' a.modelId!/>
            </#list>

            <@_sysUser ids=t.userIds!><#assign userMap=map!/></@_sysUser>
            <@_category ids=t.categoryIds!><#assign categoryMap=map!/></@_category>
            <@_model ids=t.modelIds!><#assign modelMap=map!/></@_model>

            <#list page.list as a>
            <tr target="sid" rel="${a.id}">
                <td>
                    <a href="javascript:;" class="btnText green" onclick="$.bringBack({itemId:'${a.id}', itemType:'content', url:'${a.url!}', title:'${(a.title?js_string)!}', description:'${(a.description?js_string)!}',cover:'${(a.cover?js_string)!}',publishDate:'${(a.publishDate)!}'}); return false;"><i class="icon-ok"></i> <@t.page 'select'/></a>
                </td>
                <td>${a.id}</td>
                <td>
                    <div class="box">
                        <h3>[<span class="exclude-translate">${(categoryMap[a.categoryId?string].name)!}</span>] ${(a.copied?then('['+t.pageMessage('copied')+']',''))!}<a href="cmsContent/view.html?id=${a.id}" class="exclude-translate" target="dialog" rel="viewContent${a.id}">${(a.title)!}</a></h3>
                        <p>
                            <label><@t.page 'content.promulgator'/>:</label><span class="exclude-translate">${(userMap[a.userId?string].nickName)!}</span>
                            <label><@t.page 'model'/>:</label><span class="exclude-translate">${(modelMap[a.modelId].name)!}</span>
                            <#if modelMap[a.modelId]?has_content&&modelMap[a.modelId].hasChild>
                                <label><a href="cmsContent/lookup_list.html?parentId=${a.id}&categoryId=${a.categoryId}&field=${field!'relatedContentId'}" target="ajax" rel="content_list"><@t.page 'content.child_management'/></a></label>
                            </#if>
                            <#if a.expiryDate?has_content><label><@t.page 'expiry_date'/>:</label><span class="exclude-translate">${a.expiryDate!}</span></#if>
                        </p>
                    </div>
                </td>
                <td>${a.scores!}</td>
                <td>${a.comments!}</td>
                <td>${a.clicks!}</td>
                <td>${a.publishDate!}</td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#assign rel='lookup_content_list'/>
    <#include "../include_page/pageDialog.html"/>
</div>
</@_contentList>