<@tools.placeMetadata path=path><#assign a=object/></@tools.placeMetadata>
<form method="post" autocomplete="off" action="cmsPage/save?rel=${rel!'placeBox'}" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <input type="hidden" name="_csrf" value="<@tools.csrfToken admin=true/>"/>
    <input type="hidden" name="type" value="place"/>
    <div class="formBar card">
        <ul>
            <li>
                <#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>
                <@sys.authorized roleIds=admin.roles url='placeTemplate/list'>
                    <li><a class="button" href="placeTemplate/list.html?path=${(path?url)!}&editType=metadata" target="navTab" rel="placeTemplate/list"><@t.page 'metadata'/></a></li>
                    <li><a class="button" href="placeTemplate/list.html?path=${(path?url)!}" target="navTab" rel="placeTemplate/list"><@t.page 'template.content'/></a></li>
                </@sys.authorized>
                <#if (a.metadataExtendList)?has_content><li><button type="submit" class="buttonActive" title="ctrl+s"><@t.page 'button.save'/></button></li></#if>
            </li>
        </ul>
    </div>
    <div class="card">
        <div class="pageFormContent" layoutH>
            <input name="path" type="hidden" value="include${path}"/>
            <dl class="nowrap">
                <dt><@t.page 'alias'/>:</dt>
                <dd>
                    ${(a.alias)!}
                </dd>
            </dl>
            <#if (a.size?has_content) && 0 lt a.size>
            <dl class="nowrap">
                <dt><@t.page 'operate'/>:</dt>
                <dd>
                    <a class="button" href="cmsPlace/dataList.html?path=${path?url}" target="navTab" rel="cmsPlace/dataList"><i class="bi bi-layout-text-sidebar-reverse"></i><@t.page 'place_data'/>:${(a.alias)!}(${a.size})</a>
                    <a class="button" href="cmsPlace/clear?path=${(path?url)!}&_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.clear_all'/>" target="ajaxTodo"><i class="icon-wrench icon-large"></i><@t.page 'button.clear_all'/></a>
                </dd>
            </dl>
            </#if>
        <@tools.templatePlaceList path='include'+path>
            <#if list?has_content>
            <dl class="nowrap">
                <dt><@t.page 'place'/>:</dt>
                <dd>
                    <#list list as a>
                        <@tools.placeMetadata path=a>
                            <#if (object.metadataExtendList)?has_content>
                                <a class="button" href="cmsPlace/metadata.html?path=${a?url}&rel=${rel!'placeBox'}" target="ajax" rel="${rel!'placeBox'}">${(object.alias)!a}</a>
                            </#if>
                            <#if 0 lt ((object.size)!0)>
                               <a class="button" href="cmsPlace/dataList.html?path=${a?url}" target="navTab" rel="cmsPlace/dataList:${a!}"><@t.page 'place_data'/>:${(object.alias)!a}(${object.size})</a>
                            </#if>
                        </@tools.placeMetadata>
                    </#list>
                </dd>
            </dl>
            </#if>
        </@tools.templatePlaceList>
        <@tools.templateRegionList path='include'+path>
            <#if list?has_content>
            <dl class="nowrap">
                <dt><@t.page 'diy'/>:</dt>
                <dd>
                    <#list list as a>
                        <@tools.diyMetadata itemType='region' itemId=a>
                            <a class="button" href="cmsPage/diy.html?id=${(object.id?url)!}" target="navTab" rel="cmsPage/diy" title="<@t.page 'diy'/>">${(object.name)!}</a>
                        </@tools.diyMetadata>
                    </#list>
                </dd>
            </dl>
            </#if>
        </@tools.templateRegionList>
            <#include "../include_page/extendData.html"/>
            <#assign extendList=(a.metadataExtendList)![]/>
            <#assign attribute=(a.extendData)!{}/>
            <@extendData extendList=extendList extendValues=attribute historyItemType='metadataExtend' historyItemId='include'+path/>
        </div>
    </div>
</form>