<#if path?has_content>
    <@_metadata path=path><#assign metadata=object/></@_metadata>
</#if>
<#macro getAction code description=''>onclick="DWZ.codemirror.instances[$('textarea.code',navTab.getCurrentPanel()).data('id')].replaceSelection('<#if description?has_content>${r'<#--'} ${description} ${r'-->'}\n</#if>${code?js_string}${description?has_content?then('\\n','')}');$.pdialog.closeCurrent();return false;"</#macro>
<div class="tabs">
    <div class="tabsHeader">
        <div class="tabsHeaderContent">
            <ul>
                <li><a href="javascript:;" onclick="return false;"><@t.page 'help.echo'/></a></li>
                <li><a href="javascript:;" onclick="return false;"><@t.page 'help.directive_and_method'/></a></li>
                <li><a href="javascript:;" onclick="return false;"><@t.page 'help.config'/></a></li>
                <#if path?has_content><li><a href="javascript:;" onclick="return false;"><@t.page 'help.contribute_form'/></a></li></#if>
            </ul>
        </div>
    </div>
    <div class="tabsContent">
        <div class="pageFormContent" layoutH>
            <ul class="tree treeFolder">
            <#if metadata?has_content>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.template_attribute'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'${(metadata.alias)!}'/>><@t.page 'template.name'/></a></li>
                <#if metadata.useDynamic?has_content&&metadata.useDynamic&&metadata.acceptParameters?has_content>
                    <#list metadata.acceptParameters?split(',') as p>
                        <#assign alias=metadata.parameterTypeMap[p].alias/>
                        <#if (metadata.parameterTypeMap[p].type)?has_content&&['user','content','category']?seq_contains(metadata.parameterTypeMap[p].type)>
                            <li><a href="javascript:;" <@getAction r'<#list '+alias?has_content?then(alias,p)+r' as k,v>${k}:${v?c}</#list>'/>><@t.page 'parameter'/>:${p}</a></li>
                        <#else>
                            <li><a href="javascript:;" <@getAction r'${('+alias?has_content?then(alias,p)+r')!}'/>><@t.page 'parameter'/>:${p}</a></li>
                        </#if>
                    </#list>
                </#if>
                <#if metadata.extendList?has_content>
                    <#list metadata.extendList as extend>
                        <li><a href="javascript:;" <@getAction r'${(metadata.extendData.'+extend.id.code+r')!}'/>><@t.page 'extend_field'/>:${extend.name}</a></li>
                    </#list>
                </#if>
                    </ul>
                </li>
                <#if metadata.useStatic?has_content&&site.useStatic>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.static_content_data'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'${(content.title)!}'/>><@t.page 'title'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${(content.url)!}'/>><@t.page 'url'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${text?no_esc!}'/>><@t.page 'content.text'/></a></li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.static_category_data'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'${(category.title)!}'/>><@t.page 'name'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${(category.url)!}'/>><@t.page 'url'/></a></li>
                    </ul>
                </li>
                <li>
                    <li><a href="javascript:;" <@getAction r'${url!}'/>><@t.page 'help.page_url'/></a></li>
                </li>
                </#if>
                <#if metadata.useDynamic?has_content&&metadata.useDynamic>
                    <li><a href="javascript:;" <@getAction r'${(user.nickName)!}'/>><@t.page 'current_user'/></a></li>
                </#if>
            </#if>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.site_attribute'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'${site.id!}'/>><@t.page 'site.id'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${site.name!}'/>><@t.page 'name'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${site.useStatic?string}'/>><@t.page 'site.enable_static'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${site.sitePath!}'/>><@t.page 'site.site_path'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${site.dynamicPath!}'/>><@t.page 'site.dynamic_path'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${site.disabled?string}'/>><@t.page 'disabled'/></a></li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.site_extend_attribute'/></a>
                    <ul>
                <@_sysConfigFieldList code='siteAttribute'>
                    <#list list as extend>
                        <li><a href="javascript:;" <@getAction r'${siteAttribute.'+extend.id.code+r'!}'/>>${extend.name}</a></li>
                    </#list>
                </@_sysConfigFieldList>
                    </ul>
                </li>
                <li><a href="javascript:;" <@getAction r'<#list .dataModel?keys as k>${k}<#sep>,</#list>' t.pageMessage('help.echo_data_model')/>><@t.page 'help.echo_data_model'/></a></li>
                <li><a href="javascript:;" <@getAction r'<#list .namespace?keys as k>${k}<#sep>,</#list>' t.pageMessage('help.echo_namespace')/>><@t.page 'help.echo_namespace'/></a></li>
            </ul>
        </div>
        <div class="pageFormContent" layoutH>
            <ul class="tree treeFolder">
            <#if type?has_content&&'task'=type>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.task_directive'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'<@_clearLog clearDate=clearDate>'+'\n    '+r'Login log cleaning:${result.loginLog},Operate log cleaning:${result.operateLog},Task log cleaning:${result.taskLog}'+'\n'+r'</@_clearLog>'/>><@t.page 'help.clear_log'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_indexContent id=id ids=ids/>'/>><@t.page 'help.rebuild_index'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_publishCategory id=id ids=ids pageIndex=pageIndex totalPage=totalPage>'+'\n    '+r'Publish failed category ids:<#list map?keys as k><#if !map[k]>${k},</#if></#list>'+'\n'+r'</@_publishCategory>'/>><@t.page 'help.publish_category'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_publishCategory id=id ids=ids>'+'\n    '+r'Publish failed content ids:<#list map?keys as k><#if !map[k]>${k},</#if></#list>'+'\n'+r'</@_publishCategory>'/>><@t.page 'help.publish_category'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_publishPage path=path>'+'\n    '+r'Publish failed templates:<#list map?keys as k><#if !map[k]>${k},</#if></#list>'+'\n'+r'</@_publishPage>'/>><@t.page 'publish_page'/></a></li>
                    <#if site.useSsi>
                        <li><a href="javascript:;" <@getAction r'<@_publishPlace path=path>'+'\n    '+r'Publish failed page fragments:<#list map?keys as k><#if !map[k]>${k},</#if></#list>'+'\n'+r'</@_publishPlace>'/>><@t.page 'publish_place'/></a></li>
                    </#if>
                    </ul>
                </li>
            </#if>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.list_directive'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'<@_contentList categoryId=categoryId containChild=containChild modelId=modelId parentId=parentId onlyUrl=onlyUrl hasImages=hasImages hasFiles=hasFiles hasCover=hasCover orderField=orderField orderType=orderType pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>'+'\n        '+r'<a href="${a.url!}">${a.title}</a>'+'\n    '+r'</#list>'+'\n'+r'</@_contentList>' t.pageMessage('help.directive.content_list.description')/>><@t.page 'content'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_contentFileList contentId=contentId fileTypes=fileTypes orderField=orderField orderType=orderType pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>${a.filePath}</#list>'+'\n'+r'</@_contentFileList>' t.pageMessage('help.directive.content_file_list.description')/>><@t.page 'content_file'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_commentList contentId=contentId orderField=orderField orderType=orderType pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>'+'\n        '+r'${a.createDate} <@_sysUser id=a.userId>${object.nickName} : </@_sysUser>'+'\n        '+r'${a.text!}</#list>'+'\n'+r'</@_commentList>' t.pageMessage('help.directive.comment_list.description')/>><@t.page 'comment'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_categoryList parentId=parentId typeId=typeId allowContribute=allowContribute pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>'+'\n        '+r'<a href="${a.url!}">${a.name}</a>'+'\n    '+r'</#list>'+'\n'+r'</@_categoryList>' t.pageMessage('help.directive.category_list.description')/>><@t.page 'category'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_categoryTypeList pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>'+'\n        '+r'<a href="${a.url!}">${a.name}</a>'+'\n    '+r'</#list>'+'\n'+r'</@_categoryTypeList>' t.pageMessage('help.directive.category_type_list.description')/>><@t.page 'category_type'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_placeList path=path orderField=orderField orderType=orderType pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>'+'\n        '+r'<a href="${a.url!}">${a.title}</a>'+'\n    '+r'</#list>'+'\n'+r'</@_placeList>' t.pageMessage('help.directive.place_list.description')/>><@t.page 'place_data'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_search word=word tagId=tagId highlight=true dictionaryValues=dictionaryValues categoryId=categoryId containChild=containChild categoryIds=categoryIds modelIds=modelIds startPublishDate=startPublishDate pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>'+'\n        '+r'<a href="${a.url!}">${a.title?no_esc}</a>'+'\n    '+r'</#list>'+'\n'+r'</@_search>' t.pageMessage('help.directive.search.description')/>><@t.page 'search'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_facetSearch word=word tagId=tagId highlight=true categoryId=categoryId modelId=modelId pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>'+'\n        '+r'<a href="${a.url!}">${a.title?no_esc}</a>'+'\n    '+r'</#list>'+'\n'+r'</@_facetSearch>' t.pageMessage('help.directive.facet_search.description')/>><@t.page 'facet_search'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_wordList startCreateDate=startCreateDate endCreateDate=endCreateDate orderField=orderField orderType=orderType pageIndex=pageIndex pageSize=pageSize>'+'\n    '+r'<#list page.list as a>${a.name!}:${a.searchCount}</#list>'+'\n'+r'</@_wordList>' t.pageMessage('help.directive.word_list.description')/>><@t.page 'search_word'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_modelList parentId=parentId hasChild=hasChild onlyUrl=onlyUrl hasImages=hasImages hasFiles=hasFiles>'+'\n    '+r'<#list page.list as a>${a.id}:${a.name}<#sep>,</#list>'+'\n'+r'</@_modelList>' t.pageMessage('help.directive.model_list.description')/>><@t.page 'model'/></a></li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.entity_directive'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'<@_content id=id>'+'\n    '+r'<a href="${object.url!}">${object.title}</a>'+'\n'+r'</@_content>' 'id:'+t.pageMessage('content.id')/>><@t.page 'content'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_content ids=ids>'+'\n    '+r'<#list map as k,content><a href="${content.url!}">${content.title}</a><#sep>,</#list>'+'\n'+r'</@_content>' 'ids:'+t.pageMessage('content.multiple_id')/>><@t.page 'content.multiple'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_category id=id code=code>'+'\n    '+r'<a href="${object.url!}">${object.name}</a>'+'\n'+r'</@_category>' 'id:'+t.pageMessage('category.id')+',code:'+t.pageMessage('category.code')/>><@t.page 'category'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_category ids=ids>'+'\n    '+r'<#list map as k,category><a href="${category.url!}">${category.name}</a><#sep>,</#list>'+'\n'+r'</@_category>' 'ids:'+t.pageMessage('category.multiple_id')/>><@t.page 'category.multiple'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_tag id=id>${object.name}</@_tag>' 'id:'+t.pageMessage('tag.id')/>><@t.page 'tag'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_tag ids=ids>'+'\n    '+r'<#list map as k,tag>${tag.name}<#sep>,</#list>'+'\n'+r'</@_tag>' 'ids'+t.pageMessage('tag.multiple_id')/>><@t.page 'tag.multiple'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_sysUser id=id>${object.nickName}</@_sysUser>' 'id:'+t.pageMessage('user.id')/>><@t.page 'user'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_sysUser ids=ids>'+'\n    '+r'<#list map as k,user>${user.nickName}<#sep>,</#list>'+'\n'+r'</@_sysUser>' 'ids:'+t.pageMessage('user.multiple_id')/>><@t.page 'user.multiple'/></a></li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.tool_directive'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'<@_createCategoryFile id=id templatePath=templatePath filePath=filePath pageIndex=pageIndex>${url}</@_createCategoryFile>'/>><@t.page 'help.directive.publish_category'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_createContentFile id=id templatePath=templatePath filePath=filePath pageIndex=pageIndex>${url}</@_createContentFile>'/>><@t.page 'help.directive.publish_content'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_createTemplateFile templatePath=templatePath filePath=filePath pageIndex=pageIndex>${url}</@_createTemplateFile>'/>><@t.page 'help.directive.publish_page'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_userAgent>${object.deviceType}</@_userAgent>' t.pageMessage('help.directive.useragent.description')/>><@t.page 'help.directive.useragent'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<@_sendEmail email=email cc=cc bcc=bcc title=title templatePath=templatePath content=content><#if result>success</#if></@_sendEmail>' t.pageMessage('help.directive.email.description')/>><@t.page 'help.directive.email'/></a></li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.attribute_method'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'<#assign attribute=getContentAttribute(contentId)/>' t.pageMessage('help.method.content.description')/>><@t.page 'help.method.content'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<#assign attributeMap=getContentAttributes(contentIds)/>' t.pageMessage('help.method.contents.description')/>><@t.page 'help.method.contents'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<#assign contentPage=getContentPage(text,pageIndex)/>' t.pageMessage('help.method.content_text.description')/>><@t.page 'help.method.content_text'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<#assign attribute=getCategoryAttribute(categoryId)/>' t.pageMessage('help.method.category.description')/>><@t.page 'help.method.category'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<#assign attributeMap=getCategoryAttributes(categoryIds)/>' t.pageMessage('help.method.categorys.description')/>><@t.page 'help.method.categorys'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<#assign attribute=getPlaceAttribute(placeId)/>' t.pageMessage('help.method.place_data.description')/>><@t.page 'help.method.place_data'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<#assign attributeMap=getPlaceAttributes(placeIds)/>' t.pageMessage('method.place_datas.description')/>><@t.page 'help.method.place_datas'/></a></li>
                    </ul>
                </li>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.tool_method'/></a>
                    <ul>
                        <li><a href="javascript:;" <@getAction r'${getDate(.now,"thisSunday")}' t.pageMessage('help.method.date.description')/>><@t.page 'help.method.date'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getHtml(url,parameter)}' t.pageMessage('help.method.html.description')/>><@t.page 'help.method.html'/></a></li>
                        <li><a href="javascript:;" <@getAction r'<#list getKeywords(word) as a>${a}<#sep>,</#list>' t.pageMessage('help.method.keywords.description')/>><@t.page 'help.method.keywords'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getMd5(value)}' t.pageMessage('help.method.md5.description')/>><@t.page 'help.method.md5'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getHash(value)}' t.pageMessage('help.method.hash.description')/>><@t.page 'help.method.hash'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getSha1(value)}' t.pageMessage('help.method.sha1.description')/>><@t.page 'help.method.sha1'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getSha2(value)}' t.pageMessage('help.method.sha2.description')/>><@t.page 'help.method.sha2'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getPage(url,pageIndex,pageParameter)}' t.pageMessage('help.method.page.description')/>><@t.page 'help.method.page'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getRandom(number)}' t.pageMessage('help.method.random.description')/>><@t.page 'help.method.random'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getSleep(second)}' t.pageMessage('help.method.sleep.description')/>><@t.page 'help.method.sleep'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getTemplateResult(template)}' t.pageMessage('help.method.template_result.description')/>><@t.page 'help.method.template_result'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getTextFromHtml(html)}' t.pageMessage('help.method.text_from_html.description')/>><@t.page 'help.method.text_from_html'/></a></li>
                        <li><a href="javascript:;" <@getAction r'${getUUID()}' t.pageMessage('help.method.uuid.description')/>><@t.page 'help.method.uuid'/></a></li>
                        <li><a href="javascript:;" <@getAction r'getXml(xml)' t.pageMessage('help.method.xml.description')/>><@t.page 'help.method.xml'/></a></li>
                    </ul>
                </li>
            </ul>
        </div>
        <div class="pageFormContent" layoutH>
            <ul class="tree treeFolder">
<@_sysConfigList>
    <#list list as a>
        <#if 'siteAttribute' != a.code>
                <li>
                    <a href="javascript:;" <@getAction r'<@_sysConfigData code="'+a.code+r'"></@_sysConfigData>' field/>>${a.code}:${a.description!}</a>
                    <ul>
                        <@_sysConfigFieldList code=a.code>
                            <#list list as extend>
                        <li><a href="javascript:;" <@getAction r'<@_sysConfigData code="'+a.code+r'">${object.'+extend.id.code+r'!}</@_sysConfigData>' a.description+':'+extend.name/>>${extend.name}</a></li>
                            </#list>
                        </@_sysConfigFieldList>
                    </ul>
                </li>
         </#if>
    </#list>
</@_sysConfigList>
            </ul>
        </div>
    <#if path?has_content>
        <div class="pageFormContent" layoutH>
            <ul class="tree treeFolder">
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.content_contribute'/></a>
                    <ul>
                <@_categoryList queryAll=true allowContribute=true pageSize=500>
                    <#list page.list as a>
                        <li>
                            <a href="cmsCategory/contributeForm.html?categoryId=${a.id}" class="exclude-translate" target="dialog" mask="true">${(a.name)!}</a>
                        </li>
                    </#list>
                </@_categoryList>
                    </ul>
                </li>
<#macro placeTree filepath=''>
    <@_templateList path='/include'+filepath>
        <#list list as a>
            <#local path=filepath+'/'+a.fileName>
            <@_placeMetadata path=path>
                <#if a.directory>
                    <li>
                        <a href="javascript:;" onclick="return false;">${a.fileName}</a>
                        <ul><@placeTree path/></ul>
                    </li>
                <#elseif object.allowContribute>
                    <li>
                        <a href="placeTemplate/form.html?path=${(path?url)!}" target="dialog" mask="true">${(object.alias)!a.fileName}</a>
                    </li>
                </#if>
            </@_placeMetadata>
        <#else>
            <li><a><@t.page 'empty_directory'/></a></li>
        </#list>
    </@_templateList>
</#macro>
                <li>
                    <a href="javascript:;" onclick="return false;"><@t.page 'help.place_contribute'/></a>
                    <ul><@placeTree/></ul>
                </li>
            </ul>
        </div>
    </#if>
    </div>
</div>