<?xml version="1.0" encoding="utf-8"?>
<!--
	/**************************************************************************\
	* Simple Groupware 0.724                                                   *
	* http://www.simple-groupware.de                                           *
	* Copyright (C) 2002-2011 by Thomas Bley                                   *
	* ------------------------------------------------------------------------ *
	*  This program is free software; you can redistribute it and/or           *
	*  modify it under the terms of the GNU General Public License Version 2   *
	*  as published by the Free Software Foundation; only version 2            *
	*  of the License, no later version.                                       *
	*                                                                          *
	*  This program is distributed in the hope that it will be useful,         *
	*  but WITHOUT ANY WARRANTY; without even the implied warranty of          *
	*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
	*  GNU General Public License for more details.                            *
	*                                                                          *
	*  You should have received a copy of the GNU General Public License       *
	*  Version 2 along with this program; if not, write to the Free Software   *
	*  Foundation, Inc., 59 Temple Place - Suite 330, Boston,                  *
	*  MA  02111-1307, USA.                                                    *
	\**************************************************************************/
-->
<table modulename="{t}Tree{/t}" default_view="display" orderby="lft" order="asc" limit="20" enable_purgeall="true" disable_history="true">
  <view name="display" displayname="{t}Display{/t}" nosqlfolder="true" merge_tabs="true">
  </view>
  <view name="permissions" displayname="{t}Permissions{/t}" nosqlfolder="true" template="display" merge_tabs="true">
  </view>
  <view name="details" displayname="{t}Details{/t}" nosqlfolder="true" tfield_1="ftitle">
  </view>
  <view name="edit" displayname="{t}Edit{/t}" schema_mode="edit" nosqlfolder="true" right="write" accesskey="e" showinsingleview="true">
  </view>
  <view name="history" displayname="{t}History{/t}" visibility="button" template="details" accesskey="i" icon="history.png" nosqlfolder="true">
  </view>
  
  <tab name="general" displayname="{t}General{/t}" />
  <tab name="permissions" displayname="{t}Permissions{/t}" />

  <field name="ftitle" displayname="{t}Title{/t}" db_size="40" simple_type="text" required="true" nowrap="true">
    <linktext views="all" value="#index.php?view=details&amp;iframe=1&amp;item[]=@id@"/>
    <link views="all" value="index.php?folder=@id@"/>
	<filter views="display|permissions" function="folderstructure"/>
  </field>
  <field name="ftype" displayname="{t}Folder Type{/t}" simple_type="select" simple_size="1" required="true">
    <data function="modules"/>
 	<notin views="permissions"/>
    <INDEX/>
  </field>
  <field name="icon" displayname="{t}Folder icon{/t}" simple_type="select" simple_size="1">
    <data function="icons_modules"/>
 	<notin views="display|permissions"/>
	<description value="nWin('ext/modules/folder_icons.php?obj=@prefix@icon');"/>
  </field>
  <field name="fdescription" displayname="{t}Description{/t}" simple_type="textarea">
	<notin views="display|permissions" />
  </field>
  <field name="fmountpoint" displayname="{t}Mountpoint{/t}" simple_type="text" no_search_index="true">
    <notin views="permissions"/>
  </field>
  <field name="custom_schema" displayname="{t}Custom schema{/t} (XML)" simple_type="textarea">
	<notin views="display|permissions" />
	<validate function="xml"/>
  </field>
  <field name="folders" displayname="{t}Merged folders{/t}" simple_type="text" no_search_index="true">
    <notin views="permissions"/>
  </field>
  <field name="fquota" displayname="{t}Quota [MB]{/t}" simple_type="int" no_search_index="true">
	<notin views="permissions"/>
  </field>
  <field name="default_values" displayname="{t}Default values for assets{/t}" simple_type="textarea">
	<notin views="display|permissions" />
	<description value="alert('
	{t}Usage{/t}:\n\n
	{t}Field{/t}={t}Value{/t}\n
	{t}Field{/t}2={t}Value{/t}2\n\n
	e.g. project=pr1\n\n
	({t}inheritance to subfolders without default values{/t})');"/>
  </field>
  <field name="lft" simple_type="int" no_search_index="true" notinall="true">
    <INDEX/>
  </field>
  <field name="rgt" simple_type="int" no_search_index="true" notinall="true">
    <INDEX/>
  </field>
  <field name="flevel" simple_type="int" no_search_index="true" hidden="true">
    <INDEX/>
	<onlyin views="display|permissions"/>
  </field>
  <field name="parent" simple_type="id" hidden="true">
    <INDEX/>
  </field>
  <field name="fsizecount" displayname="{t}Size{/t}" simple_type="int" sum="true" no_search_index="true">
    <notin views="edit|permissions"/>
    <filter views="all" function="filesize" />
  </field>
  <field name="fchsizecount" displayname="{t}Size (children){/t}" simple_type="int" sum="true" no_search_index="true">
    <notin views="edit|permissions|display"/>
    <filter views="all" function="filesize" />
  </field>
  <field name="fcount" displayname="{t}Assets{/t}" simple_type="int" sum="true" no_search_index="true">
    <notin views="edit|permissions"/>
  </field>
  <field name="fchcount" displayname="{t}Assets (children){/t}" simple_type="int" sum="true" no_search_index="true">
    <notin views="edit|permissions|display"/>
  </field>
  <field name="ffcount" displayname="{t}Folders{/t}" simple_type="int" no_search_index="true">
    <notin views="display|edit|permissions"/>
  </field>
  <field name="anchor" displayname="{t}Anchor{/t}" simple_type="text">
    <notin views="permissions"/>
    <INDEX/>
  </field>
  <field name="rread_users" displayname="{t}Read access (users){/t}" simple_type="select" no_search_index="true" simple_tab="permissions">
    <data title="{t}Users{/t}" function="dbselect|simple_sys_users|username,concat(lastname;' ';firstname)||lastname asc|10"/>
	<data title="{t}Default{/t}" values="anonymous"/>
    <notin views="display"/>
	<link value="index.php?find=asset|simple_sys_users||username=@rread_users@&amp;view=details"/>
	<linktext value="index.php?filters=rread_users|like|@rread_users@"/>
  </field>
  <field name="rread_groups" displayname="{t}Read access (groups){/t}" simple_type="select" no_search_index="true" simple_tab="permissions">
    <data function="dbselect|simple_sys_groups|groupname,groupname||groupname asc|10"/>
    <notin views="display"/>
	<link value="index.php?find=asset|simple_sys_groups||groupname=@rread_groups@&amp;view=display"/>
	<linktext value="index.php?filters=rread_groups|like|@rread_groups@"/>
  </field>
  <field name="rwrite_users" displayname="{t}Write access (users){/t}" simple_type="select" no_search_index="true" simple_tab="permissions">
    <data title="{t}Users{/t}" function="dbselect|simple_sys_users|username,concat(lastname;' ';firstname)||lastname asc|10"/>
	<data title="{t}Default{/t}" values="anonymous"/>
    <notin views="display"/>
	<link value="index.php?find=asset|simple_sys_users||username=@rwrite_users@&amp;view=details"/>
	<linktext value="index.php?filters=rwrite_users|like|@rwrite_users@"/>
  </field>
  <field name="rwrite_groups" displayname="{t}Write access (groups){/t}" simple_type="select" no_search_index="true" simple_tab="permissions">
    <data function="dbselect|simple_sys_groups|groupname,groupname||groupname asc|10"/>
    <notin views="display"/>
	<link value="index.php?find=asset|simple_sys_groups||groupname=@rwrite_groups@&amp;view=display"/>
	<linktext value="index.php?filters=rwrite_groups|like|@rwrite_groups@"/>
  </field>
  <field name="radmin_users" displayname="{t}Admin access (users){/t}" simple_type="select" no_search_index="true" simple_tab="permissions">
    <data title="{t}Users{/t}" function="dbselect|simple_sys_users|username,concat(lastname;' ';firstname)||lastname asc|10"/>
	<data title="{t}Default{/t}" values="anonymous"/>
    <notin views="display"/>
	<link value="index.php?find=asset|simple_sys_users||username=@radmin_users@&amp;view=details"/>
	<linktext value="index.php?filters=radmin_users|like|@radmin_users@"/>
  </field>
  <field name="radmin_groups" displayname="{t}Admin access (groups){/t}" simple_type="select" no_search_index="true" simple_tab="permissions">
    <data function="dbselect|simple_sys_groups|groupname,groupname||groupname asc|10"/>
    <notin views="display"/>
	<link value="index.php?find=asset|simple_sys_groups||groupname=@radmin_groups@&amp;view=display"/>
	<linktext value="index.php?filters=radmin_groups|like|@radmin_groups@"/>
  </field>
  <field name="rexception_users" displayname="{t}View access (users){/t}" simple_type="text" no_search_index="true" simple_tab="permissions">
    <notin views="display"/>
	<description value="alert('
{t}Syntax{/t}:\n
|&lt;view[,view2]&gt;:&lt;right&gt;:&lt;username[,username2]&gt;|\n
\n
{t}Examples{/t}:\n
|freebusy:read:anonymous|\n
|freebusy:read:anonymous|details:no_read:anonymous|\n
\n
{t}Rights{/t}: read, no_read, write, no_write
');"/>
  </field>
  <field name="rexception_groups" displayname="{t}View access (groups){/t}" simple_type="text" no_search_index="true" simple_tab="permissions">
    <notin views="display"/>
	<description value="alert('
{t}Syntax{/t}:\n
|&lt;view[,view2]&gt;:&lt;right&gt;:&lt;groupname[,groupname2]&gt;|\n
\n
{t}Examples{/t}:\n
|freebusy:read:internals|\n
|freebusy:read:internals|details:no_read:guests|\n
\n
{t}Rights{/t}: read, no_read, write, no_write
');"/>
  </field>
  <field name="lastsync" simple_type="datetime" notinall="true"/>
</table>