<div class="pageContent">
    <div class="leftPageContent">
        <div class="card">
            <ul class="tree treeFolder" layoutH>
        <@tools.diyMetadataList itemType="region">
            <#list list as a>
                <@t.merge 'ids' a.id/>
            </#list>
            <@sys.lock userId=admin.id itemType='region' itemIds=t.ids><#assign lockMap=map!/></@sys.lock>
            <#if lockMap?has_content>
                <#list lockMap as k,lock>
                    <#if lock.userId?has_content><@t.merge 'userIds' lock.userId/></#if>
                </#list>
            </#if>
            <@sys.user ids=t.userIds><#assign userMap=map!/></@sys.user>
            <#list list as a>
                <li>
                    <a href="cmsPage/region.html?id=${(a.id?url)!}" target="ajax" rel="diyConfigBox">
                        <#if lockMap?has_content && lockMap[a.id]?has_content>
                            <#assign lockUser=(userMap[lockMap[a.id].userId?string].nickname)!''/>
                            <i class="icon-lock icon-large" title="<@t.page 'lock.message' lockUser/> ${lockMap[a.id].createDate}"></i>
                        </#if>
                        ${a.name!}
                    </a>
                    <#if a.categoryType?has_content>
                        <@cms.categoryList queryAll=true typeId=a.categoryType pageSize=100>
                            <#if page.totalCount gt 0 >
                                <@t.clear 'ids'/>
                                <#list page.list as c>
                                    <@t.merge 'ids' a.id+'_'+c.id/>
                                </#list>
                                <@sys.lock userId=admin.id itemType='region' itemIds=t.ids><#assign categoryLockMap=map!/></@sys.lock>
                                <#if categoryLockMap?has_content>
                                    <#list categoryLockMap as k,lock>
                                        <#if lock.userId?has_content><@t.merge 'userIds' lock.userId/></#if>
                                    </#list>
                                </#if>
                                <@sys.user ids=t.userIds><#assign categoryUserMap=map!/></@sys.user>
                                <ul>
                                    <#list page.list as c>
                                        <li><a href="cmsPage/region.html?id=${(a.id?url)!}&categoryId=${c.id}" target="ajax" rel="diyConfigBox"<#if categoryLockMap?has_content && categoryLockMap[a.id+'_'+c.id]?has_content><#assign lockUser=(categoryUserMap[categoryLockMap[a.id+'_'+c.id].userId?string].nickname)!''/> title="<@t.page 'lock.message' lockUser/> ${categoryLockMap[a.id+'_'+c.id].createDate}"</#if>><#if categoryLockMap[a.id+'_'+c.id]?has_content><i class="icon-lock icon-large"></i></#if>${c.name!}</a></li>
                                    </#list>
                                </ul>
                            </#if>
                        </@cms.categoryList>
                    </#if>
                </li>
            </#list>
        </@tools.diyMetadataList>
            </ul>
        </div>
    </div>
    <div id="diyConfigBox" class="unitBox rightPageContent">
        <#if id?has_content><#include 'region.html'/></#if>
    </div>
</div>