<#macro templateTree filepath>
    <@_taskTemplateList path=filepath>
        <#list list as a>
            <li>
                <#local path=filepath+'/'+a.fileName>
                <a href="taskTemplate/${a.directory?then('directory','content')}.html?path=${(path?url)!}" target="ajax" rel="taskTemplateBox">
                    ${a.fileName}
                </a>
            <#if a.directory>
                <ul>
                    <@templateTree path/>
                </ul>
            </#if>
            </li>
        <#else>
            <li><a><@t.page 'empty_directory'/></a></li>
        </#list>
    </@_taskTemplateList>
</#macro>
<div class="pageContent">
    <div layoutH class="leftPageContent">
        <h2 class="contentTitle">
            <a class="button" href="taskTemplate/content.html?path=/" target="ajax" rel="taskTemplateBox"><@t.page 'task_template.create'/></a>
        </h2>
        <ul class="tree treeFolder">
            <@templateTree ''/>
        </ul>
    </div>
    <div id="taskTemplateBox" class="unitBox rightPageContent">
        <#include "directory.html"/>
    </div>
</div>