<#macro placeList filepath=''>
    <@tools.fileList path='/include'+filepath orderField='createDate'>
        <#list list as a>
            <@t.merge 'pages' '/include'+filepath+'/'+a.fileName/>
        </#list>
        <@sys.deptItem itemType='page' deptId=admin.deptId!'' itemIds=t.pages!><#assign deptPageMap=map!/></@sys.deptItem>
        <#list list as a>
            <#local currentPath=filepath+'/'+a.fileName>
            <#if (deptPageMap['/include'+currentPath])?has_content&&deptPageMap['/include'+currentPath]>
                <li<#if a.directory><#if (path?has_content && path?starts_with(currentPath+'/'))> class="expand"<#else> _src="cmsPlace/list.html?parent=${currentPath?url}"</#if><#elseif path?has_content && path=currentPath> class="selected"</#if>>
                <@tools.placeMetadata path=currentPath>
                    <#if a.directory>
                        <a href="javascript:;" onclick="return false;">${a.fileName}</a>
                        <#if path?has_content && path?starts_with(currentPath+'/')>
                            <ul>
                                 <@placeList currentPath/>
                            </ul>
                        </#if>
                    <#elseif (object.size)?has_content && 0 lt object.size && (!(object.metadataExtendList)?has_content)>
                        <a href="cmsPlace/dataList.html?path=${currentPath?url}" target="navTab" rel="cmsPlace/dataList" title="<@t.page 'place_data'/>:${(object.alias)!}">${(object.alias)!a.fileName} <@t.page 'place_data'/>(${object.size})</a>
                    <#else>
                        <a href="cmsPlace/metadata.html?path=${currentPath?url}"<#if (object.metadataExtendList)?has_content> class="red" title="<@t.page "metadata"/>"</#if> target="ajax" rel="placeBox">${(object.alias)!a.fileName}</a><#if 0 lt ((object.size)!0)> <a href="cmsPlace/dataList.html?path=${currentPath?url}" target="navTab" rel="cmsPlace/dataList" title="<@t.page 'place_data'/>:${(object.alias)!}"><@t.page 'place_data'/> (${object.size})</a></#if>
                    </#if>
                </@tools.placeMetadata>
                </li>
            </#if>
        <#else>
            <li><a><@t.page 'empty_directory'/></a></li>
        </#list>
    </@tools.fileList>
</#macro>
<#if parent?has_content>
     <ul>
         <@placeList parent/>
     </ul>
<#else>
    <div class="pageContent">
        <div class="leftPageContent">
            <div class="card">
                <ul class="tree treeFolder" layoutH>
                    <@placeList/>
                </ul>
            </div>
        </div>
        <div id="placeBox" class="unitBox rightPageContent">
            <#if path?has_content>
                <#include "metadata.html"/>
            </#if>
        </div>
    </div>
</#if>