<?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="Google Docs" limit="20" default_view="display" orderby="filedata_show" order="asc" sql_handler="gdocs" disable_rights="true" enable_purgeall="true" enable_purge="true" enable_new_only="true" enable_edit="true">
  <view name="display" displayname="{t}Display{/t}">
  </view>
  <view name="details" displayname="{t}Details{/t}" tfield_1="filename" show_preview="true">
  </view>

  <field name="id" displayname="{t}Id{/t}" simple_type="id">
    <notin views="display" />
	<filter views="details" function="truncate|40"/>
  </field>
  <field name="filename" simple_type="text" required="true" hidden="true">
    <onlyin views="display|details"/>
  </field>
  <field name="filedata_show" displayname="{t}File{/t}" simple_type="text">
    <onlyin views="display"/>
    <link value="download.php?view=details&amp;field=filedata&amp;item[]=@_id@&amp;subitem=@subitem@&amp;dispo=noinline" icon="download.gif"/>
    <linktext value="%index.php?folder=@folder@&amp;view=details&amp;item[]=@_id@&amp;iframe=1"/>
  </field>
  <field name="filedata" displayname="{t}File{/t}" simple_type="files" simple_file_size="20M" simple_size="1" required="true">
    <notin views="display"/>
  </field>
  <field name="description" displayname="{t}Description{/t}" simple_type="textarea">
	<notin views="display" />
  </field>
  <field name="fileext" displayname="{t}Type{/t}" simple_type="text">
	<onlyin views="details"/>
  </field>
  <field name="lastmodified" displayname="{t}Modified{/t}" simple_type="datetime">
    <filter views="all" function="shortdateformat" />
	<onlyin views="display|details"/>
  </field>
  <field name="created" displayname="{t}Created{/t}" simple_type="datetime">
    <filter views="all" function="shortdateformat" />
	<onlyin views="display|details"/>
  </field>
  <field name="status" displayname="{t}Status{/t}" simple_type="select" simple_size="1">
	<data title="{t}Default{/t}" values="{t}confirmed{/t}|{t}checked{/t}|{t}unconfirmed{/t}|{t}to be checked{/t}|{t}canceled{/t}"/>
	<data title="{t}Lookup{/t}" function="dbselect|simple_statuses|statusname,statusname|stattype='files'|statusname asc|10"/>
  </field>
  <field name="filesize" displayname="{t}Size{/t}" simple_type="text" sum="true">
    <filter views="all" function="filesize" />
	<onlyin views="display|details"/>
  </field>
<!--<field name="fileperms" displayname="{t}Permissions{/t}" simple_type="text">
	<onlyin views="details"/>
  </field>-->
  <field name="filesize" displayname="{t}Size{/t}" simple_type="text" sum="true">
    <filter views="all" function="filesize" />
	<onlyin views="display|details"/>
  </field>
  
  <rowfilter name="filter_sys0" views="all" type="_bgstyle" function="buildbgcolor|bgcolor"/>
  <field name="bgcolor" displayname="{t}Color{/t}" simple_type="select" simple_size="1" hidden="true" editable="true">
    <data sort="asc" values="#DDDDFF_##_{t}blue{/t}|#CCFFCC_##_{t}green{/t}|#FFDDFF_##_{t}magenta{/t}|#FFDDAA_##_{t}orange{/t}|#FFCCCC_##_{t}red{/t}|#FFFFDD_##_{t}yellow{/t}|#FFFFFF_##_{t}white{/t}"/>
  </field>
  
  <field name="notification" displayname="{t}Notification{/t}" simple_type="multitext" separator=", " hidden="true" editable="true">
    <data title="{t}Users{/t}" function="dbselect|simple_sys_users|email,concat(lastname;' ';firstname)|length(email)!=0 and activated=1|lastname asc|10"/>
    <data title="{t}Groups{/t}" function="dbselect|simple_sys_groups|concat('@';groupname),groupname|length(members)!=0 and activated=1|groupname asc|10"/>
    <data title="{t}Contacts{/t}" function="dbselect|simple_contacts|email,concat(lastname;' ';firstname)|length(email)!=0|lastname asc|10"/>
    <data title="{t}Contact groups{/t}" function="dbselect|simple_contactgroups|concat('@';groupname),groupname|length(members)!=0|groupname asc|10"/>
  </field>
  
  <field name="history" displayname="{t}History{/t}" simple_type="textarea" notinall="true"><onlyin views="history" /></field>  
</table>