{* DO NOT EDIT THIS FILE! Use an override template instead. *}
{let content=$class_attribute.content}

{* Type. *}
<div class="block">
    <label>{'Type'|i18n( 'design/standard/class/datatype' )}:</label>
    <p>
    {switch match=$content.type}
    {case match=0}{'New and existing objects'|i18n( 'design/standard/class/datatype' )}{/case}
    {case match=1}{'Only new objects'|i18n( 'design/standard/class/datatype' )}{/case}
    {case match=2}{'Only existing objects'|i18n( 'design/standard/class/datatype' )}{/case}
    {case}<i>{'Empty'|i18n( 'design/standard/class/datatype' )}</i>{/case}
    {/switch}
    </p>
</div>

{* Allowed classes. *}
<div class="block">
    <label>{'Allowed classes'|i18n( 'design/standard/class/datatype' )}:</label>
    {section show=$content.class_constraint_list|count|lt( 1 )}
    <p>{'Any'|i18n( 'design/standard/class/datatype' )}</p>
    {section-else}
    <ul>
    {section var=Classes loop=$content.class_constraint_list}<li>{$Classes.item}</li>{/section}
    </ul>
    {/section}
</div>

{* Default location. *}
<div class="block">
<label>{'Default location for objects'|i18n( 'design/standard/class/datatype' )}:</label>
{section show=$content.default_placement}
{let default_location=fetch( content, node, hash( node_id, $content.default_placement.node_id ) )}
<table class="list" cellspacing="0">
<tr>
    <th>{'Name'|i18n( 'design/standard/class/datatype' )}</th>
    <th>{'Type'|i18n( 'design/standard/class/datatype' )}</th>
    <th>{'Section'|i18n( 'design/standard/class/datatype' )}</th>
</tr>
<tr>
    <td>{$default_location.class_identifier|class_icon( small, $default_location.class_name )}&nbsp;<a href={$default_location.url_alias|ezurl}>{$default_location.name|wash}</a></td>
    <td>{$default_location.class_name|wash}</td>
    <td>{let section_object=fetch( section, object, hash( section_id, $default_location.object.section_id ) )}{section show=$section_object}{concat( 'section/view/', $section_object.id)|ezurl}>{$section_object.name|wash}</a>{section-else}<i>{'Unknown section'|i18n( 'design/standard/class/datatype' )}</i>{/section}{/let}</td>
</tr>
</table>
{/let}
{section-else}
<p>{'New objects will not be placed in the content tree.'|i18n( 'design/standard/class/datatype' )}</p>
{/section}
</div>

{/let}
