<?xml version="1.0" encoding="UTF-8"?>

<list>
  <definition>
    <departmentBrowser>true</departmentBrowser>
    <departmentRootVisible>false</departmentRootVisible>
    <baseMode>true</baseMode>
    <multiSelect>true</multiSelect>
    <template>../../../ihtml/themes/default/list.tpl</template>
    <module>groups</module>
    <label>List of groups</label>
    <defaultSortColumn>1</defaultSortColumn>

    <objectType>
      <label>Group</label>
      <objectClass>posixGroup</objectClass>
      <category>groups</category>
      <class>group</class>
      <image>group</image>
    </objectType>

  </definition>

  <table>
    <layout>|20px;c|||120px|150px;r|</layout>

    <department>
      <value>%{filter:objectType(dn,objectClass)}</value>
    </department>

    <department>
      <value>%{filter:departmentLink(row,dn,description)}</value>
      <span>2</span>
    </department>

    <column>
      <value>%{filter:objectType(dn,objectClass)}</value>
    </column>

    <column>
      <label>Name</label>
      <sortAttribute>cn</sortAttribute>
      <sortType>string</sortType>
      <value>%{filter:link(row,dn,"%s",cn)}</value>
      <export>true</export>
    </column>

    <column>
      <label>Description</label>
      <sortAttribute>description</sortAttribute>
      <sortType>string</sortType>
      <value>%{filter:link(row,dn,"%s",description)}</value>
      <export>true</export>
    </column>

    <column>
      <label>Properties</label>
      <value>%{filter:filterProperties(row,objectClass)}</value>
    </column>

    <column>
      <label>Actions</label>
      <value>%{filter:actions(dn,row,objectClass)}</value>
    </column>

  </table>

  <actionmenu>

    <action>
     <type>sub</type>
     <image>add_circle</image>
     <label>Create</label>

     <action>
      <name>new</name>
      <type>entry</type>
      <image>group_add</image>
      <label>Group</label>
     </action>
    </action>

    <action>
      <type>separator</type>
    </action>

    <action>
      <type>sub</type>
      <image>settings</image>
      <label>Manage</label>

      <action>
        <name>edit</name>
        <type>entry</type>
        <image>edit</image>
        <label>Edit</label>
      </action>

      <action>
        <name>remove</name>
        <type>entry</type>
        <image>delete</image>
        <label>Remove</label>
      </action>

      <action>
        <name>sendMessage</name>
        <type>entry</type>
        <depends>DaemonEvent_notify</depends>
        <image>notifications</image>
        <label>Send message</label>
      </action>

    </action>

    <action>
      <type>exporter</type>
    </action>

    <action>
      <type>separator</type>
    </action>

    <action>
      <type>copypaste</type>
    </action>

    <action>
      <type>snapshot</type>
    </action>

  </actionmenu>

  <actiontriggers snapshot="true" copypaste="true">

    <action>
      <name>cp</name>
      <type>copypaste</type>
    </action>

    <action>
      <name>edit</name>
      <type>entry</type>
      <image>edit</image>
      <label>Edit group</label>
    </action>

    <action>
      <name>snapshot</name>
      <type>snapshot</type>
    </action>

    <action>
      <name>remove</name>
      <type>entry</type>
      <image>delete</image>
      <acl>groups/group[d]</acl>
      <label>Remove group</label>
    </action>

  </actiontriggers>

</list>
