<@_placeMetadata path=path><#assign a=object/></@_placeMetadata>
<form method="post" autocomplete="off" action="cmsTemplate/savePlace" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <input type="hidden" name="_csrf" value="<@_csrfToken admin=true/>"/>
    <div class="formBar">
        <ul>
        <#if site.useSsi>
            <li><a class="button" href="cmsTemplate/publishPlace?path=${(path?url)!}&_csrf=<@_csrfToken admin=true/>" target="ajaxTodo"><@t.page 'button.publish'/></a></li>
        </#if>
        <#if !site.parentId?has_content>
            <li><a class="button" href="cmsTemplate/deletePlace?path=${(path?url)!}&navTabId=placeTemplate/list&_csrf=<@_csrfToken admin=true/>" title="<@t.page 'confirm.delete_file'/>" target="ajaxTodo"><i class="icon-trash icon-large"></i> <@t.page 'button.delete'/></a></li>
        </#if>
        <#if a?has_content&&a.size gt 0>
    <@_sysAuthorized roleIds=admin.roles url='cmsPlace/dataList'>
        <@_sysDeptPage deptId=admin.deptId!'' pages='/include'+path>
            <li><a class="button" href="cmsPlace/dataList.html?path=${(path?url)!}" target="navTab" rel="cmsPlace/dataList" title="<@t.page 'place_data.place'/>:${(a.alias)!}"><@t.page 'place.management'/></a></li>
        </@_sysDeptPage>
    </@_sysAuthorized>
            <#if a.allowContribute>
        <@_sysAuthorized roleIds=admin.roles url='cmsTemplate/content'>
            <li><a class="button"href="placeTemplate/form.html?path=${(path?url)!}" target="dialog" mask="true"><@t.page 'help.contribute_form'/></a></li>
        </@_sysAuthorized>
            </#if>
        </#if>
            <li><a class="button" href="placeTemplate/metadata.html?path=${(path?url)!}" target="ajax" rel="cmsTemplatePlace"><@t.page 'metadata'/></a></li>
    <#if site.parentId?has_content>
        <li><button type="button" class="buttonDisabled"><@t.page 'site.parent_maintain'/></button></li>
    <#else>
            <li><button type="submit" class="buttonActive"><@t.page 'button.save'/></button></li>
    </#if>
        </ul>
    </div>
    <h2 class="contentTitle">
         <a class="button" href="cmsTemplate/ftlLookup.html" target="dialog" mask="true"><@t.page 'template.fragment'/></a>
         <a class="button" href="placeTemplate/lookup.html" target="dialog" mask="true"><@t.page 'place'/></a>
         <a class="button" href="cmsWebFile/lookup.html" target="dialog" mask="true"><@t.page 'webfile'/></a>
        <a class="button" href="cmsTemplate/help.html?type=place" target="dialog" mask="true"><@t.page 'template.help'/></a>
    </h2>
    <div class="pageFormContent" layoutH>
           <div>
            <input name="path" type="hidden" value="${path}"/>
            <textarea name="content" class="code" escape="true" mode="freemarkermixed"><@_templateContent path='/include'+path>${(object)!}</@_templateContent></textarea>
        </div>
    </div>
</form>