<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration>
  <source>
    <!-- Define different entity types -->
    <entity id="e0" name="name" label="Name" type="string">
      <help>Internal name for the modul.</help>
    </entity>
    <entity id="e2" name="label" label="Label">
      <help>Label of the modul in singular form. Used in the UI</help>
    </entity>
    <entity id="e3" name="label_plural" label="Label">
      <help>Label of the modul in plural form. Used in the UI</help>
    </entity>
    <entity id="e4" name="description" label="Description" type="textarea"/>
    <entity id="e5" name="str_repr" label="String represention">
      <help>Whenever an item of the modul is displayed as simple string it will be displayed in the following form.</help>
    </entity>
    <entity id="e6" name="actions" label="Actions">
      <renderer type="selection" filter="@id == %mid"/>
      <help>Select the actions which should be enabled for this modul</help>
    </entity>
    <entity id="e7" name="display" label="Display location">
      <help>Select the menu where the modul should be displayed</help>
      <renderer type="dropdown"/>
      <options>
        <option value="none">Hide modul</option>
        <option value="header-menu">Header menu</option>
        <option value="admin-menu">Administration menu</option>
        <option value="user-menu">User menu</option>
      </options>
    </entity>
    <entity id="e8" name="default_group" label="Default group">
      <help>New items of this modul will have the given group</help>
      <renderer type="dropdown"/>
    </entity>
    <entity id="forms" name="blobforms" label="Forms">
      <help>Select a forms which will be used to create the new item</help>
      <renderer type="dropdown" nolink="true" remove_filtered="true" filter="( @name eq %modul ) and ( %review_state_id eq '2' ) or ( 'admin' in $user.get_roles ) or ( 'formularmanager' in $user.get_roles )"/>
    </entity>
  </source>
  <form id="create" autocomplete="off" method="POST" action="" enctype="multipart/form-data">
    <snippet ref="create_snippet"/>
  </form>
  <form id="update" autocomplete="off" method="POST" action="" enctype="multipart/form-data">
    <snippet ref="create_snippet"/>
  </form>
  <form id="read" readonly="true">
    <snippet ref="create_snippet"/>
  </form>
  <form id="blobform">
    <row>
      <col><field ref="forms"/></col>
    </row>
  </form>

  <!-- Create-->
  <snippet id="create_snippet">
    <snippet ref="s1"/>
  </snippet>

  <!-- Modul -->
  <snippet id="s1">
    <row>
      <col><field ref="e0"/></col>
    </row>
    <row>
      <col><field ref="e2"/></col>
      <col><field ref="e3"/></col>
    </row>
    <row>
      <col><field ref="e4"/></col>
    </row> <row>
      <col><field ref="e5"/></col>
      <col><field ref="e7"/></col>
    </row>
    <row>
      <col><field ref="e6"/></col>
      <col><field ref="e8"/></col>
    </row>
  </snippet>
</configuration>
