<@cms.contentProductList title=title userId=userId startPrice=startPrice endPrice=endPrice 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 'title'/>:</label>
                    <input type="text" name="title" value="${title!}"/>
                </li>
                <li>
                    <label><@t.page 'content.promulgator'/>:</label>
                    <#include "../include_page/userId.html"/>
                </li>
                <li>
                    <label><@t.page 'product.price'/>:</label>
                    <input type="text" name="startPrice" value="${endPprice!}" size="10"/><span>-</span><input type="text" name="endPrice" value="${endPrice!}" size="10"/>
                </li>
            </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='cmsContentProduct/add'><#assign authorizedMap=map/></@sys.authorized>
<div class="card">
    <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 'id'/></th>
                <th><@t.page 'title'/></th>
                <th><@t.page 'content.promulgator'/></th>
                <th orderField="price"><@t.page 'product.price'/></th>
                <th><@t.page 'product.quantity_limit'/></th>
                <th orderField="inventory"><@t.page 'product.inventory'/></th>
                <th orderField="sales"><@t.page 'product.sales'/></th>
                <th width="100"><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'userIds' a.userId!/>
                <@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>${a.id!}</td>
                <td class="wrap">
                    <#if a.cover?has_content || (contentMap[a.contentId?string].cover)?has_content>
                        <div class="thumbnail">
                            <img src="${(a.cover)!(contentMap[a.contentId?string].cover)!}"/>
                        </div>
                    </#if>
                    <div class="box">
                        <h3>${a.title!}</h3>
                        <p class="exclude-translate">
                            <a href="cmsContent/view.html?id=${a.contentId!}" class="exclude-translate" target="dialog" width="1200" height="600" rel="viewContent${a.contentId!}">${(contentMap[a.contentId?string].title)!}</a>
                        </p>
                    </div>
                </td>
                <td>${(userMap[a.userId?string].nickname)!}</td>
                <td>${a.price!}</td>
                <td>${a.minQuantity!} - ${a.maxQuantity!}</td>
                <td>${a.inventory!}</td>
                <td>${a.sales!}</td>
                <td class="wrap">
                    <a href="cmsContentProduct/add.html?id=${a.id}" class="edit btnText blue" target="dialog" rel="cmsContentProduct_edit"><i class="icon-edit"></i><@t.page 'button.edit'/></a>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@cms.contentProductList>