<@tools.placeMetadata path=path><#assign a=object/></@tools.placeMetadata>
<form method="post" autocomplete="off" action="cmsTemplate/savePlace" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
    <div class="formBar card">
        <ul>
        <#if site.useSsi>
            <li><a class="button" href="cmsTemplate/publishPlace?path=${(path?url)!}&_csrf=<@tools.csrfToken admin=true/>" target="ajaxTodo"><@t.page 'button.publish'/></a></li>
        </#if>
            <li><a class="button" href="cmsTemplate/deletePlace?path=${(path?url)!}&navTabId=placeTemplate/list&_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.delete_file'/>" target="ajaxTodo"><i class="icon-trash icon-large"></i><@t.page 'button.delete'/></a></li>
            <li><a class="button" href="cmsPlace/list.html?path=${(path?url)!}" target="navTab" rel="cmsPlace/list"><@t.page 'place.management'/></a></li>
        <#if a?has_content&&a.size?has_content&&a.size gt 0>
    <@sys.authorized roleIds=admin.roles url='cmsPlace/dataList'>
        <@sys.deptItem itemType='page' deptId=admin.deptId!'' itemIds='/include'+path>
            <li><a class="button" href="cmsPlace/dataList.html?path=${(path?url)!}" target="navTab" rel="cmsPlace/dataList" title="<@t.page 'place_data'/>:${(a.alias)!}"><@t.page 'place_data'/>(${a.size!})</a></li>
        </@sys.deptItem>
    </@sys.authorized>
            <#if a.allowContribute>
        <@sys.authorized 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>
        </@sys.authorized>
            </#if>
        </#if>
            <li><a class="button" href="placeTemplate/metadata.html?path=${(path?url)!}&rel=cmsTemplatePlace" target="ajax" rel="cmsTemplatePlace"><@t.page 'metadata'/></a></li>
            <li><button type="submit" class="buttonActive" title="ctrl+s"<#if path?has_content> lock-url="common/lock?itemType=placeTemplate&itemId=${(path?url)!}" close-url="common/unlock?itemType=placeTemplate&itemId=${(path?url)!}"</#if>><@t.page 'button.save'/></button></li>
        </ul>
    </div>
    <div class="card">
        <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&path=${(path?url)!}" target="dialog" mask="true"><@t.page 'template.help'/></a>
            <a class="button" href="cmsFileHistory/list.html?path=/include${(path?url)!}" lookupGroup=""><@t.page 'history'/></a>
            <a class="button" href="<@t.page 'template.manual.url'/>" target="_blank"><@t.page 'template.manual'/></a>
            <div class="float-right">
                <select class="combox codeTheme">
                <#list codeTheme as k,a>
                    <option value="${k}">${a}</option>
                </#list>
                 </select>
            </div>
        </h2>
        <div class="pageFormContent" layoutH>
            <div>
                <input name="path" type="hidden" value="${path}"/>
                <textarea name="content" class="code" escape="true" mode="freemarkermixed"><@tools.fileContent path='/include'+path>${(object)!}</@tools.fileContent></textarea>
            </div>
        </div>
    </div>
</form>