<#macro templateTree filepath>
    <@tools.fileList type='task' path=filepath>
        <#list list as a>
            <#if !a.directory><@t.merge 'paths' filepath+'/'+a.fileName/></#if>
        </#list>
        <@sys.lock userId=admin.id itemType='taskTemplate' itemIds=t.paths><#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>
        </#