<div class="accordion">
<@_sysModuleList parentId=parentId>
    <#list page.list as a>
        <@t.merge 'moduleIds' a.id!/>
    </#list>
    <@_sysRoleModule roleIds=admin.roles moduleIds=t.moduleIds!><#assign roleModuleMap=map!/></@_sysRoleModule>
    
    <#list page.list as a>
        <#if (roleModuleMap[a.id?string])??&&roleModuleMap[a.id?string]>
    <div class="accordionHeader">
        <h2><#if (a.attached)?has_content><i class="${a.attached} icon-large"></i></#if> <@t.menu a.id/> <i class="icon icon-chevron-up"></i></h2>
    </div>
    <div class="accordionContent">
        <ul class="tree">
        <@_sysModuleList parentId=a.id>
            <#list page.list as a>
                <@t.merge 'childModuleIds' a.id!/>
            </#list>
            <@_sysRoleModule roleIds=admin.roles moduleIds=t.childModuleIds!><#assign childRoleModuleMap=map!/></@_sysRoleModule>
            <#list page.list as a>
                <#if (childRoleModuleMap[a.id?string])?has_content&&childRoleModuleMap[a.id?string]>
            <li><a href="${(a.url)!}" target="navTab" rel="${(a.url)!}"><#if (a.attached)?has_content><i class="${a.attached} icon-large"></i></#if> <@t.menu a.id/></a></li>
                </#if>
            </#list>
        </@_sysModuleList>
        </ul>
    </div>
        </#if>
    </#list>
</@_sysModuleList>
</div>