<?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}Companies{/t}" default_view="display" orderby="companyname" order="asc" limit="20" enable_new="true" enable_edit="true" enable_delete="true" enable_empty="true">
  <view name="display" displayname="{t}Display{/t}" groupby="category">
  </view>
  <view name="details" displayname="{t}Details{/t}" tfield_1="companyname">
  </view>
  <singlebutton views="display|details" name="contacts" displayname="{t}Contacts{/t}" onclick="locate('index.php?view=display&amp;find=assets|simple_contacts||company=@companyname@');" icon="../modules/contacts.png" />

  <field name="companyname" displayname="{t}Company{/t}" simple_type="text" is_unique="true" required="true">
    <linktext views="display" value="#index.php?view=details&amp;iframe=1&amp;item[]=@id@"/>
  </field>
  <field name="numberofemps" displayname="{t}Number of employees{/t}" simple_type="text">
  </field>
  <field name="industry" displayname="{t}Industry{/t}" simple_type="text">
  </field>
  <field name="street" displayname="{t}Street{/t}" simple_type="text">
    <link value="@ext/norefer.php?url=http://maps.google.com/maps?q=@zipcode@ @city@ @street@ @country@"/>
  </field>
  <field name="zipcode" displayname="{t}Zipcode{/t}" simple_type="text">
  </field>
  <field name="city" displayname="{t}City{/t}" simple_type="text">
  </field>
  <field name="state" displayname="{t}State{/t}" simple_type="text">
	<notin views="display" />
  </field>
  <field name="country" displayname="{t}Country{/t}" simple_type="text">
  </field>
  <field name="homepage" displayname="{t}Homepage{/t}" simple_type="text">
    <validate function="url"/>
    <filter views="display" function="truncate|20"/>
	<notin views="display" />
    <link value="@ext/norefer.php?url=@homepage@"/>
  </field>
  <field name="description" displayname="{t}Description{/t}" simple_type="textarea">
	<notin views="display" />
  </field>
  <field name="category" displayname="{t}Category{/t}" simple_type="select" simple_size="1">
	<data function="dbselect|simple_categories|categoryname,categoryname|cattype='companies'|categoryname asc|10"/>
  </field>
</table>