<@sys.siteList parentId=parentId name=name pageIndex=pageNum pageSize=numPerPage>
<#if parentId?has_content><@sys.site id=parentId><#assign parent=object/></@sys.site></#if>
<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">
            <#if parentId?has_content>
                <li>
                    <label><@t.page 'site.parent'/>:</label><label><@sys.site id=parentId>${object.name!}</@sys.site></label>
                </li>
            </#if>
                <li>
                    <label><@t.page 'name'/>:</label>
                    <input type="text" size="20" name="name" value="${name!}"/>
                </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="card">
    <div class="panelBar">
        <ul class="toolBar">
        <#if parentId?has_content>
            <li><a href="sysSite/list.html" target="navTab" rel="sysSite/list" data-change-title="false"><i class="icon-circle-arrow-up icon-large"></i><@t.page 'button.return'/></a></li>
            <li class="line">line</li>
        </#if>
            <li><a href="sysSite/add.html?parentId=${parentId!}" target="navTab" rel="sysSite/add"><i class="icon-plus-sign-alt icon-large"></i><@t.page 'site.add'/></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH>
        <thead>
            <tr>
                <th width="30"><@t.page 'id'/></th>
                <th><@t.page 'name'/></th>
            <#if parent?has_content && parent.hasChild && parent.multiple>
                <th><@t.page 'directory'/></th>
            </#if>
                <th><@t.page 'site.dynamic_path'/></th>
                <th><@t.page 'site.enable_static'/></th>
                <th><@t.page 'site.site_path'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr>
                <td>${a.id}</td>
                <td class="exclude-translate">${a.name!}${a.multiple?then(' ['+t.pageMessage('site.multiple')+']','')} <#if site.id=a.id>[<@t.page 'site.current_site'/>]</#if></td>
            <#if parent?has_content && parent.hasChild && parent.multiple>
                <td class="exclude-translate">${a.directory!}</td>
            </#if>
                <td><a href="${a.dynamicPath!}" target="_blank">${a.dynamicPath!}</a></td>
                <td>${t.pageMessage(a.useStatic?then('yes','no'))} ${a.useSsi?then('['+t.pageMessage('ssi_enabled')+']','')}</td>
                <td><a href="${a.sitePath!}" target="_blank">${a.sitePath!}</a></td>
                <td class="wrap">
                    <a href="sysSite/add.html?id=${a.id}" class="edit btnText blue" target="navTab" rel="sysSite/edit"><i class="icon-edit"></i><@t.page 'site.edit'/></a>
                    <a href="sysDomain/add.html?siteId=${a.id!}" class="btnText blue" target="navTab" rel="sysDomain/add"><@t.page 'domain.add'/></a>
                    <a href="sysDomain/list.html?siteId=${a.id!}" class="btnText" target="navTab" rel="sysDomain/list"><@t.page 'domain.list'/></a>
                    <a href="sysSite/export?id=${a.id!}&_csrf=<@tools.csrfToken admin=true/>" class="btnText" target="dwzExport"><@t.page "button.export"/></a>
                <#if a.hasChild>
                    <a href="sysSite/list.html?parentId=${a.id!}" class="btnText" target="navTab" data-change-title="false" rel="sysSite/list"><@t.page 'site.child_management'/></a>
                </#if>
                <#if !(parent?has_content && parent.hasChild && parent.multiple)>
                    <a href="sysSite/configTemplate.html?siteId=${a.id!}" class="btnText" target="dialog" rel="config_${a.id!}"><@t.page 'server_config'/></a>
                </#if>
                    <a href="sysSite/delete?id=${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>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@sys.siteList>