<@cms.tagList advanced=true name=name typeId=typeId 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 'name'/>:</label>
                    <input type="text" name="name" value="${(name)!}"/>
                </li>
                <li>
                    <label><@t.page 'tag_type'/>:</label>
                    <#if typeId?has_content><@cms.tagType id=typeId><#assign tagTypeName=object.name/></@cms.tagType></#if>
                    <input type="hidden" name="typeId" value="${typeId!}"/>
                    <input readonly="readonly" name="tagTypeName" type="text" size="10" value="${(tagTypeName)!}"/>
                    <a class="btnLook" href="cmsTagType/lookup.html?typeId=${typeId!}" width="920" lookupGroup=""><@t.page 'tag_type.select'/></a>
                </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='cmsTag/add,cmsTag/delete,cmsTagType/list'><#assign authorizedMap=map/></@sys.authorized>
<div class="card">
    <div class="panelBar">
        <ul class="toolBar">
        <#if authorizedMap['cmsTag/add']>
            <li><a href="cmsTag/add.html" target="navTab" rel="cmsTag/add"><i class="icon-plus-sign-alt icon-large"></i><@t.page 'tag.add'/></a></li>
        </#if>
        <#if authorizedMap['cmsTag/delete']>
            <li><a href="cmsTag/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>
        <#if authorizedMap['cmsTagType/list']>
            <li class="line">line</li>
            <li><a href="cmsTagType/list.html" target="navTab" rel="cmsTagType/list"><i class="icon-tags icon-large"></i><@t.page 'tag_type'/></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 width="30"><@t.page 'id'/></th>
                <th><@t.page 'name'/></th>
                <th><@t.page 'tag_type'/></th>
                <th orderField="searchCount"><@t.page 'tag.search_count'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'typeIds' a.typeId!/>
            </#list>

            <@cms.tagType ids=t.typeIds!><#assign typeMap=map!/></@cms.tagType>
            <#list page.list as a>
            <tr>
                <td><input name="ids" value="${a.id}" type="checkbox"></td>
                <td>${a.id}</td>
                <td class="exclude-translate"><a href="cmsContent/search.html?tagId=${a.id}" target="navTab" rel="cmsContent/search" title="<@t.page 'content.search'/>">${(a.name)!}</a></td>
                <td class="exclude-translate">${(typeMap[a.typeId?string].name)!}</td>
                <td>${a.searchCount!}</td>
                <td class="wrap">
                <#if authorizedMap['cmsTag/add']>
                    <a href="cmsTag/add.html?id=${a.id}" class="edit btnText blue" target="navTab" rel="cmsTag/edit" title="<@t.page 'tag.edit'/>"><i class="icon-edit"></i><@t.page 'button.edit'/></a>
                </#if>
                <#if authorizedMap['cmsTag/delete']>
                    <a href="cmsTag/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>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@cms.tagList>