<?xml version="1.0"?>
<object xmlns:i18n="http://xml.zope.org/namespaces/i18n"
    name="{{{ dexterity_type_name }}}"
    meta_type="Dexterity FTI"
    i18n:domain="{{{ package.dottedname }}}">

  <!-- Basic properties -->
  <property
      i18n:translate=""
      name="title">{{{ dexterity_type_name }}}</property>
  <property
      i18n:translate=""
      name="description">{{{ dexterity_type_desc }}}</property>

  <property name="allow_discussion">False</property>
  <property name="factory">{{{ dexterity_type_name }}}</property>
  <property name="icon_expr"></property>
  <property name="link_target"></property>

  <!-- Hierarchy control -->
  <property name="global_allow">{{{ dexterity_type_global_allow | to_boolean }}}</property>
{{% if  dexterity_type_base_class == 'Container' %}}
  <property name="filter_content_types">{{{ dexterity_type_filter_content_types | to_boolean }}}</property>
  <property name="allowed_content_types">
  <!--
    <element value="Document" />
    <element value="File" />
  -->
  </property>
{{% endif %}}
  <!-- Schema, class and security -->
  <property name="add_permission">{{{ package.dottedname }}}.Add{{{ dexterity_type_name_klass }}}</property>
{{% if dexterity_type_create_class %}}
  <property name="klass">{{{ package.dottedname }}}.content.{{{ dexterity_type_name_normalized }}}.{{{ dexterity_type_name_klass }}}</property>
{{% else %}}
  <property name="klass">plone.dexterity.content.{{{ dexterity_type_base_class }}}</property>
{{% endif %}}
{{% if dexterity_type_supermodel %}}
  <property name="model_file">{{{ package.dottedname }}}.content:{{{ dexterity_type_name_normalized }}}.xml</property>
  <property name="model_source"></property>
  <property name="schema"></property>
{{% else %}}
  <property name="model_file"></property>
  <property name="model_source"></property>
  <property name="schema">{{{ package.dottedname }}}.content.{{{ dexterity_type_name_normalized }}}.I{{{ dexterity_type_name_klass }}}</property>
{{% endif %}}

  <!-- Enabled behaviors -->
  <property name="behaviors" purge="false">
    <!-- Details about all standard behaviors following can be read at
         https://docs.plone.org/external/plone.app.dexterity/docs/reference/standard-behaviours.html
    -->
{{% if dexterity_type_activate_default_behaviors %}}
    <element value="plone.basic"/>
    <element value="plone.namefromtitle"/>
    <element value="plone.allowdiscussion"/>
    <element value="plone.excludefromnavigation"/>
    <element value="plone.shortname"/>
    <element value="plone.ownership"/>
    <element value="plone.publication"/>
    <element value="plone.categorization"/>
    <element value="plone.locking" />
{{% endif %}}
{{% if not dexterity_type_activate_default_behaviors %}}
    <!-- <element value="plone.basic"/> -->
    <!-- <element value="plone.namefromtitle"/> -->
    <!-- <element value="plone.allowdiscussion"/> -->
    <!-- <element value="plone.excludefromnavigation"/> -->
    <!-- <element value="plone.shortname"/> -->
    <!-- <element value="plone.ownership"/> -->
    <!-- <element value="plone.publication"/> -->
    <!-- <element value="plone.categorization"/> -->
    <!-- <element value="plone.locking" /> -->
{{% endif %}}
    <!--<element value="plone.leadimage"/>-->
    <!--<element value="plone.relateditems"/>-->
    <!--<element value="plone.richtext"/>-->
    <!--<element value="plone.tableofcontents"/>-->
    <!--<element value="plone.versioning" />-->
    <!--<element value="plone.translatable" />-->
{{% if dexterity_type_base_class == "Container" %}}
    <!--<element value="plone.nextprevioustoggle" />-->
    <!--<element value="plone.nextpreviousenabled" />-->
    <!--<element value="plone.navigationroot" />-->
    <!--<element value="plone.selectablecontrainstypes" />-->
{{% endif %}}
  </property>

  <!-- View information -->
  <property name="add_view_expr">string:${folder_url}/++add++{{{ dexterity_type_name }}}</property>
  <property name="default_view">view</property>
  <property name="default_view_fallback">False</property>
  <property name="immediate_view">view</property>
  <property name="view_methods">
    <element value="view"/>
  </property>

  <!-- Method aliases -->
  <alias
      from="(Default)"
      to="(dynamic view)"
  />
  <alias
      from="edit"
      to="@@edit"
  />
  <alias
      from="sharing"
      to="@@sharing"
  />
  <alias
      from="view"
      to="(selected layout)"
  />

  <!-- Actions -->
  <action
      action_id="view"
      category="object"
      condition_expr=""
      i18n:attributes="title"
      i18n:domain="plone"
      title="View"
      url_expr="string:${object_url}"
      visible="True">
    <permission value="View"/>
  </action>
  <action
      action_id="edit"
      category="object"
{{% if dexterity_type_activate_default_behaviors %}}
      condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user|python:True"
{{% else %}}
      condition_expr=""
{{% endif %}}
      i18n:attributes="title"
      i18n:domain="plone"
      title="Edit"
      url_expr="string:${object_url}/edit"
      visible="True">
    <permission value="Modify portal content"/>
  </action>

</object>
