CVSROOT: /sources/phpgroupware Module name: property Changes by: Sigurd Nes <sigurdne> 07/10/13 10:02:54
Modified files: inc : class.soadmin_entity.inc.php class.soentity.inc.php class.sotts.inc.php class.uiadmin_entity.inc.php class.uientity.inc.php class.uitts.inc.php setup : setup.inc.php tables_current.inc.php tables_update.inc.php templates/base : admin_entity.xsl entity.xsl tts.xsl Log message: enable tickets to be started from general entities as "destination" - inside the ticket - the entity will appear as "origin" CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soadmin_entity.inc.php?cvsroot=phpgroupware&r1=1.32&r2=1.33 http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soentity.inc.php?cvsroot=phpgroupware&r1=1.34&r2=1.35 http://cvs.savannah.gnu.org/viewcvs/property/inc/class.sotts.inc.php?cvsroot=phpgroupware&r1=1.27&r2=1.28 http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_entity.inc.php?cvsroot=phpgroupware&r1=1.27&r2=1.28 http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uientity.inc.php?cvsroot=phpgroupware&r1=1.50&r2=1.51 http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uitts.inc.php?cvsroot=phpgroupware&r1=1.63&r2=1.64 http://cvs.savannah.gnu.org/viewcvs/property/setup/setup.inc.php?cvsroot=phpgroupware&r1=1.60&r2=1.61 http://cvs.savannah.gnu.org/viewcvs/property/setup/tables_current.inc.php?cvsroot=phpgroupware&r1=1.75&r2=1.76 http://cvs.savannah.gnu.org/viewcvs/property/setup/tables_update.inc.php?cvsroot=phpgroupware&r1=1.68&r2=1.69 http://cvs.savannah.gnu.org/viewcvs/property/templates/base/admin_entity.xsl?cvsroot=phpgroupware&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/property/templates/base/entity.xsl?cvsroot=phpgroupware&r1=1.15&r2=1.16 http://cvs.savannah.gnu.org/viewcvs/property/templates/base/tts.xsl?cvsroot=phpgroupware&r1=1.19&r2=1.20 Patches: Index: inc/class.soadmin_entity.inc.php =================================================================== RCS file: /sources/phpgroupware/property/inc/class.soadmin_entity.inc.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -b -r1.32 -r1.33 --- inc/class.soadmin_entity.inc.php 31 Aug 2007 06:48:06 -0000 1.32 +++ inc/class.soadmin_entity.inc.php 13 Oct 2007 10:02:53 -0000 1.33 @@ -24,7 +24,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage admin - * @version $Id: class.soadmin_entity.inc.php,v 1.32 2007/08/31 06:48:06 sigurdne Exp $ + * @version $Id: class.soadmin_entity.inc.php,v 1.33 2007/10/13 10:02:53 sigurdne Exp $ */ /** @@ -300,6 +300,7 @@ $category['fileupload'] = $this->db->f('fileupload'); $category['loc_link'] = $this->db->f('loc_link'); $category['start_project'] = $this->db->f('start_project'); + $category['start_ticket'] = $this->db->f('start_ticket'); return $category; } } @@ -440,12 +441,13 @@ $values['location_level'], $values['fileupload'], $values['loc_link'], - $values['start_project'] + $values['start_project'], + $values['start_ticket'] ); $values_insert = $this->bocommon->validate_db_insert($values_insert); - $this->db->query("INSERT INTO fm_entity_category (entity_id,id,name, descr,prefix,lookup_tenant,tracking,location_level,fileupload,loc_link,start_project) " + $this->db->query("INSERT INTO fm_entity_category (entity_id,id,name, descr,prefix,lookup_tenant,tracking,location_level,fileupload,loc_link,start_project,start_ticket) " . "VALUES ($values_insert)",__LINE__,__FILE__); $values_acl_location= array( @@ -633,7 +635,8 @@ 'location_level'=> $entity['location_level'], 'fileupload' => $entity['fileupload'], 'loc_link' => $entity['loc_link'], - 'start_project' => $entity['start_project'] + 'start_project' => $entity['start_project'], + 'start_ticket' => $entity['start_ticket'] ); $value_set = $this->bocommon->validate_db_update($value_set); Index: inc/class.soentity.inc.php =================================================================== RCS file: /sources/phpgroupware/property/inc/class.soentity.inc.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -b -r1.34 -r1.35 --- inc/class.soentity.inc.php 8 May 2007 09:11:45 -0000 1.34 +++ inc/class.soentity.inc.php 13 Oct 2007 10:02:53 -0000 1.35 @@ -24,7 +24,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage entity - * @version $Id: class.soentity.inc.php,v 1.34 2007/05/08 09:11:45 sigurdne Exp $ + * @version $Id: class.soentity.inc.php,v 1.35 2007/10/13 10:02:53 sigurdne Exp $ */ /** @@ -493,7 +493,8 @@ } } - $sql = "SELECT * FROM fm_origin WHERE destination ='entity_" . $entity_id . '_' . $cat_id . "' AND destination_id = $id"; +// ------------- get origin--------------- + $sql = "SELECT * FROM fm_origin WHERE destination ='entity_" . $entity_id . '_' . $cat_id . "' AND destination_id = $id ORDER by origin DESC"; $this->db->query($sql,__LINE__,__FILE__); $i=-1; @@ -512,8 +513,29 @@ $last_type=$this->db->f('origin'); } +// ------------- end get origin--------------- +// ------------- get destination--------------- + $sql = "SELECT * FROM fm_origin WHERE origin ='entity_" . $entity_id . '_' . $cat_id . "' AND origin_id = $id ORDER by destination DESC"; + $this->db->query($sql,__LINE__,__FILE__); + + $i=-1; + while ($this->db->next_record()) + { + if($last_type != $this->db->f('destination')) + { + $i++; } + $entity['destination'][$i]['type'] = $this->db->f('destination'); + $entity['destination'][$i]['link'] = $this->bocommon->get_origin_link($this->db->f('destination')); + $entity['destination'][$i]['data'][]= array( + 'id'=> $this->db->f('destination_id'), + 'type'=> $this->db->f('destination') + ); + $last_type=$this->db->f('destination'); + } + } +// ------------- end get destination--------------- return $entity; } Index: inc/class.sotts.inc.php =================================================================== RCS file: /sources/phpgroupware/property/inc/class.sotts.inc.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- inc/class.sotts.inc.php 7 Oct 2007 18:19:59 -0000 1.27 +++ inc/class.sotts.inc.php 13 Oct 2007 10:02:53 -0000 1.28 @@ -24,7 +24,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage helpdesk - * @version $Id: class.sotts.inc.php,v 1.27 2007/10/07 18:19:59 sigurdne Exp $ + * @version $Id: class.sotts.inc.php,v 1.28 2007/10/13 10:02:53 sigurdne Exp $ */ /** @@ -327,7 +327,8 @@ } - $sql = "SELECT * FROM fm_origin WHERE origin = 'tts' AND origin_id='$id' ORDER by destination DESC "; +// ------------- get origin--------------- + $sql = "SELECT * FROM fm_origin WHERE destination = 'tts' AND destination_id='$id' ORDER by origin DESC"; $this->db->query($sql,__LINE__,__FILE__); @@ -335,20 +336,44 @@ $i=-1; while ($this->db->next_record()) { - if($last_type != $this->db->f('destination')) + if($last_type != $this->db->f('origin')) { $i++; } - $ticket['origin'][$i]['type'] = $this->db->f('destination'); - $ticket['origin'][$i]['link'] = $this->bocommon->get_origin_link($this->db->f('destination')); + $ticket['origin'][$i]['type'] = $this->db->f('origin'); + $ticket['origin'][$i]['link'] = $this->bocommon->get_origin_link($this->db->f('origin')); $ticket['origin'][$i]['data'][]= array( + 'id'=> $this->db->f('origin_id'), + 'type'=> $this->db->f('origin') + ); + + $last_type=$this->db->f('origin'); + } +//------------end get origin--------------- +//--- --------get destination + + $sql = "SELECT * FROM fm_origin WHERE origin = 'tts' AND origin_id='$id' ORDER by destination DESC"; + + $this->db->query($sql,__LINE__,__FILE__); + + $last_type = false; + $i=-1; + while ($this->db->next_record()) + { + if($last_type != $this->db->f('destination')) + { + $i++; + } + $ticket['destination'][$i]['type'] = $this->db->f('destination'); + $ticket['destination'][$i]['link'] = $this->bocommon->get_origin_link($this->db->f('destination')); + $ticket['destination'][$i]['data'][]= array( 'id'=> $this->db->f('destination_id'), 'type'=> $this->db->f('destination') ); $last_type=$this->db->f('destination'); } - +//------------- return $ticket; } @@ -433,6 +458,23 @@ $this->db->query("update fm_tenant set contact_phone='". $ticket['extra']['contact_phone']. "' where id='". $ticket['extra']['tenant_id']. "'",__LINE__,__FILE__); } + + if(is_array($ticket['origin'])) + { + if($ticket['origin'][0]['data'][0]['id']) + { + $this->db->query("INSERT INTO fm_origin (origin,origin_id,destination,destination_id,user_id,entry_date) " + . "VALUES ('" + . $ticket['origin'][0]['type']. "','" + . $ticket['origin'][0]['data'][0]['id']. "'," + . "'tts'," + . $id . "," + . $this->account . "," + . time() . ")",__LINE__,__FILE__); + } + } + + if($this->db->transaction_commit()) { $this->historylog->add('O',$id,mktime(),''); Index: inc/class.uiadmin_entity.inc.php =================================================================== RCS file: /sources/phpgroupware/property/inc/class.uiadmin_entity.inc.php,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- inc/class.uiadmin_entity.inc.php 26 Jan 2007 14:53:47 -0000 1.27 +++ inc/class.uiadmin_entity.inc.php 13 Oct 2007 10:02:53 -0000 1.28 @@ -26,7 +26,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage admin - * @version $Id: class.uiadmin_entity.inc.php,v 1.27 2007/01/26 14:53:47 sigurdne Exp $ + * @version $Id: class.uiadmin_entity.inc.php,v 1.28 2007/10/13 10:02:53 sigurdne Exp $ */ /** @@ -837,7 +837,10 @@ 'lang_loc_link_statustext' => lang('Enable link from location detail'), 'lang_start_project' => lang('Start project'), 'value_start_project' => $values['start_project'], - 'lang_start_project_statustext' => lang('Enable start project from this category') + 'lang_start_project_statustext' => lang('Enable start project from this category'), + 'lang_start_ticket' => lang('Start ticket'), + 'value_start_ticket' => $values['start_ticket'], + 'lang_start_ticket_statustext' => lang('Enable start ticket from this category') ); $appname = lang('entity'); Index: inc/class.uientity.inc.php =================================================================== RCS file: /sources/phpgroupware/property/inc/class.uientity.inc.php,v retrieving revision 1.50 retrieving revision 1.51 diff -u -b -r1.50 -r1.51 --- inc/class.uientity.inc.php 21 Sep 2007 19:28:56 -0000 1.50 +++ inc/class.uientity.inc.php 13 Oct 2007 10:02:53 -0000 1.51 @@ -24,7 +24,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage entity - * @version $Id: class.uientity.inc.php,v 1.50 2007/09/21 19:28:56 sigurdne Exp $ + * @version $Id: class.uientity.inc.php,v 1.51 2007/10/13 10:02:53 sigurdne Exp $ */ /** @@ -952,6 +952,20 @@ 'origin_id' => $id ); + $ticket_link_data = array + ( + 'menuaction' => $this->currentapp.'.uitts.add', + 'bypass' => true, + 'location_code' => $values['location_code'], + 'p_num' => $values['p_num'], + 'p_entity_id' => $values['p_entity_id'], + 'p_cat_id' => $values['p_cat_id'], + 'tenant_id' => $values['tenant_id'], + 'origin' => 'entity_' . $this->entity_id . '_' . $this->cat_id, + 'origin_id' => $id + ); + + //_debug_array($values['origin']); for ($i=0;$i<count($values['origin']);$i++) { @@ -975,6 +989,32 @@ } } + if(is_array($values['destination'])) + { + for ($i=0;$i<count($values['destination']);$i++) + { + $values['destination'][$i]['link']=$GLOBALS['phpgw']->link('/index.php',$values['destination'][$i]['link']); + if(substr($values['destination'][$i]['type'],0,6)=='entity') + { + $type = explode("_",$values['destination'][$i]['type']); + $entity_id = $type[1]; + $cat_id = $type[2]; + + if(!is_object($boadmin_entity)) + { + $boadmin_entity = CreateObject($this->currentapp.'.boadmin_entity'); + } + $entity_category = $boadmin_entity->read_single_category($entity_id,$cat_id); + $values['destination'][$i]['descr'] = $entity_category['name']; + } + else + { + $values['destination'][$i]['descr']= lang($values['destination'][$i]['type']); + } + } + } + + for ($i=0;$i<count($values['attributes']);$i++) { if($values['attributes'][$i]['history']==1) @@ -1008,6 +1048,9 @@ 'start_project' => $category['start_project'], 'lang_start_project' => lang('start project'), 'project_link' => $GLOBALS['phpgw']->link('/index.php',$project_link_data), + 'start_ticket' => $category['start_ticket'], + 'lang_start_ticket' => lang('start ticket'), + 'ticket_link' => $GLOBALS['phpgw']->link('/index.php',$ticket_link_data), 'fileupload' => $category['fileupload'], 'link_view_file' => $GLOBALS['phpgw']->link('/index.php',$link_file_data), 'link_to_files' => $link_to_files, @@ -1024,6 +1067,7 @@ 'value_origin_type' => $origin, 'value_origin_id' => $origin_id, + 'value_destination' => $values['destination'], 'lang_no_cat' => lang('no category'), 'lang_cat_statustext' => lang('Select the category. To do not use a category select NO CATEGORY'), 'select_name' => 'cat_id', @@ -1290,6 +1334,30 @@ } } + if(is_array($values['destination'])) + { + for ($i=0;$i<count($values['destination']);$i++) + { + $values['destination'][$i]['link']=$GLOBALS['phpgw']->link('/index.php',$values['destination'][$i]['link']); + if(substr($values['destination'][$i]['type'],0,6)=='entity') + { + $type = explode("_",$values['destination'][$i]['type']); + $entity_id = $type[1]; + $cat_id = $type[2]; + + if(!is_object($boadmin_entity)) + { + $boadmin_entity = CreateObject($this->currentapp.'.boadmin_entity'); + } + $entity_category = $boadmin_entity->read_single_category($entity_id,$cat_id); + $values['destination'][$i]['descr'] = $entity_category['name']; + } + else + { + $values['destination'][$i]['descr']= lang($values['destination'][$i]['type']); + } + } + } for ($i=0;$i<count($attributes_values);$i++) { @@ -1322,6 +1390,8 @@ 'value_origin' => $values['origin'], 'value_origin_type' => $origin, 'value_origin_id' => $origin_id, + 'value_destination_type' => 'destination', + 'value_destination' => $values['destination'], 'lang_entity' => lang('entity'), 'entity_name' => $entity['name'], Index: inc/class.uitts.inc.php =================================================================== RCS file: /sources/phpgroupware/property/inc/class.uitts.inc.php,v retrieving revision 1.63 retrieving revision 1.64 diff -u -b -r1.63 -r1.64 --- inc/class.uitts.inc.php 24 Aug 2007 13:59:13 -0000 1.63 +++ inc/class.uitts.inc.php 13 Oct 2007 10:02:53 -0000 1.64 @@ -24,7 +24,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage helpdesk - * @version $Id: class.uitts.inc.php,v 1.63 2007/08/24 13:59:13 sigurdne Exp $ + * @version $Id: class.uitts.inc.php,v 1.64 2007/10/13 10:02:53 sigurdne Exp $ */ /** @@ -980,7 +980,85 @@ } $GLOBALS['phpgw']->xslttpl->add_file(array('tts')); +//------------------- start ticket from other location + $bypass = get_var('bypass',array('POST','GET')); + if(isset($_POST) && $_POST && isset($bypass) && $bypass) + { + $boadmin_entity = CreateObject($this->currentapp.'.boadmin_entity'); + $location_code = get_var('location_code',array('POST','GET')); + $values['descr'] = get_var('descr',array('POST','GET')); + $p_entity_id = get_var('p_entity_id',array('POST','GET')); + $p_cat_id = get_var('p_cat_id',array('POST','GET')); + $values['p'][$p_entity_id]['p_entity_id'] = $p_entity_id; + $values['p'][$p_entity_id]['p_cat_id'] = $p_cat_id; + $values['p'][$p_entity_id]['p_num'] = get_var('p_num',array('POST','GET')); + + $origin = get_var('origin',array('POST','GET')); + $origin_id = get_var('origin_id',array('POST','GET')); + + if($p_entity_id && $p_cat_id) + { + $entity_category = $boadmin_entity->read_single_category($p_entity_id,$p_cat_id); + $values['p'][$p_entity_id]['p_cat_name'] = $entity_category['name']; + } + + if($location_code) + { + $values['location_data'] = $bolocation->read_single($location_code,array('tenant_id'=>$tenant_id,'p_num'=>$p_num)); + } + } + + + if($values['origin']) + { + $origin = $values['origin']; + $origin_id = $values['origin_id']; + } + if($origin) + { + unset($values['origin']); + unset($values['origin_id']); + $values['origin'][0]['type']= $origin; + $values['origin'][0]['link']=$this->bocommon->get_origin_link($origin); + $values['origin'][0]['data'][]= array( + 'id'=> $origin_id, + 'type'=> $origin + ); + } + + + if (isset($values['origin']) AND is_array($values['origin'])) + { + for ($i=0;$i<count($values['origin']);$i++) + { + $values['origin'][$i]['link']=$GLOBALS['phpgw']->link('/index.php',$values['origin'][$i]['link']); + if(substr($values['origin'][$i]['type'],0,6)=='entity') + { + $type = explode("_",$values['origin'][$i]['type']); + $entity_id = $type[1]; + $cat_id = $type[2]; + + if(!is_object($boadmin_entity)) + { + $boadmin_entity = CreateObject($this->currentapp.'.boadmin_entity'); + } + $entity_category = $boadmin_entity->read_single_category($entity_id,$cat_id); + $values['origin'][$i]['descr'] = $entity_category['name']; + } + else + { + $values['origin'][$i]['descr']= lang($values['origin'][$i]['type']); + if($values['origin'][$i]['type'] == 'request') + { + $selected_request = True; + } + } + } + } + + +//------------------------ //_debug_array($insert_record); if (isset($values['save'])) { @@ -1154,6 +1232,10 @@ $data = array ( + 'value_origin' => isset($values['origin']) ? $values['origin'] : '', + 'value_origin_type' => (isset($origin)?$origin:''), + 'value_origin_id' => (isset($origin_id)?$origin_id:''), + 'lang_dateformat' => strtolower($dateformat), 'dateformat_validate' => $dateformat_validate, 'onKeyUp' => $onKeyUp, @@ -1680,6 +1762,33 @@ } } + + if (isset($ticket['destination']) AND is_array($ticket['destination'])) + { + for ($i=0;$i<count($ticket['destination']);$i++) + { + $ticket['destination'][$i]['link']=$GLOBALS['phpgw']->link('/index.php',$ticket['destination'][$i]['link']); + + if(substr($ticket['destination'][$i]['type'],0,6)=='entity') + { + $type = explode("_",$ticket['destination'][$i]['type']); + $entity_id = $type[1]; + $cat_id = $type[2]; + + if(!isset($boadmin_entity) || !is_object($boadmin_entity)) + { + $boadmin_entity = CreateObject($this->currentapp.'.boadmin_entity'); + } + $entity_category = $boadmin_entity->read_single_category($entity_id,$cat_id); + $ticket['destination'][$i]['descr'] = $entity_category['name']; + } + else + { + $ticket['destination'][$i]['descr']= lang($ticket['destination'][$i]['type']); + } + } + } + $GLOBALS['phpgw']->js->validate_file('dateformat','dateformat',$this->currentapp); $link_file_data = array @@ -1691,6 +1800,7 @@ $data = array ( 'value_origin' => (isset($ticket['origin'])?$ticket['origin']:''), + 'value_destination' => (isset($ticket['destination'])?$ticket['destination']:''), 'lang_dateformat' => strtolower($dateformat), 'dateformat_validate' => $dateformat_validate, 'onKeyUp' => $onKeyUp, Index: setup/setup.inc.php =================================================================== RCS file: /sources/phpgroupware/property/setup/setup.inc.php,v retrieving revision 1.60 retrieving revision 1.61 diff -u -b -r1.60 -r1.61 --- setup/setup.inc.php 12 Aug 2007 21:24:41 -0000 1.60 +++ setup/setup.inc.php 13 Oct 2007 10:02:54 -0000 1.61 @@ -8,12 +8,12 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage setup - * @version $Id: setup.inc.php,v 1.60 2007/08/12 21:24:41 sigurdne Exp $ + * @version $Id: setup.inc.php,v 1.61 2007/10/13 10:02:54 sigurdne Exp $ */ $setup_info['property']['name'] = 'property'; $setup_info['property']['title'] = 'Property'; - $setup_info['property']['version'] = '0.9.17.539'; + $setup_info['property']['version'] = '0.9.17.540'; $setup_info['property']['app_order'] = 8; $setup_info['property']['enable'] = 1; $setup_info['property']['app_group'] = 'office'; Index: setup/tables_current.inc.php =================================================================== RCS file: /sources/phpgroupware/property/setup/tables_current.inc.php,v retrieving revision 1.75 retrieving revision 1.76 diff -u -b -r1.75 -r1.76 --- setup/tables_current.inc.php 12 Aug 2007 21:24:41 -0000 1.75 +++ setup/tables_current.inc.php 13 Oct 2007 10:02:54 -0000 1.76 @@ -8,7 +8,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage setup - * @version $Id: tables_current.inc.php,v 1.75 2007/08/12 21:24:41 sigurdne Exp $ + * @version $Id: tables_current.inc.php,v 1.76 2007/10/13 10:02:54 sigurdne Exp $ */ $phpgw_baseline = array( @@ -1561,7 +1561,8 @@ 'location_level' => array('type' => 'int','precision' => '4','nullable' => True), 'fileupload' => array('type' => 'int','precision' => '4','nullable' => True), 'loc_link' => array('type' => 'int','precision' => '4','nullable' => True), - 'start_project' => array('type' => 'int','precision' => '4','nullable' => True) + 'start_project' => array('type' => 'int','precision' => '4','nullable' => True), + 'start_ticket' => array('type' => 'int','precision' => '2','nullable' => True) ), 'pk' => array('entity_id','id'), 'fk' => array(), Index: setup/tables_update.inc.php =================================================================== RCS file: /sources/phpgroupware/property/setup/tables_update.inc.php,v retrieving revision 1.68 retrieving revision 1.69 diff -u -b -r1.68 -r1.69 --- setup/tables_update.inc.php 12 Aug 2007 21:24:41 -0000 1.68 +++ setup/tables_update.inc.php 13 Oct 2007 10:02:54 -0000 1.69 @@ -8,7 +8,7 @@ * @internal Development of this application was funded by http://www.bergen.kommune.no/bbb_/ekstern/ * @package property * @subpackage setup - * @version $Id: tables_update.inc.php,v 1.68 2007/08/12 21:24:41 sigurdne Exp $ + * @version $Id: tables_update.inc.php,v 1.69 2007/10/13 10:02:54 sigurdne Exp $ */ /** @@ -1834,3 +1834,21 @@ return $GLOBALS['setup_info']['property']['currentver']; } } + + /** + * Update property version from 0.9.17.539 to 0.9.17.540 + */ + + $test[] = '0.9.17.539'; + function property_upgrade0_9_17_539() + { + $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin(); + + $GLOBALS['phpgw_setup']->oProc->AddColumn('fm_entity_category','start_ticket',array('type' => 'int','precision' => 2,'nullable' => True)); + + if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit()) + { + $GLOBALS['setup_info']['property']['currentver'] = '0.9.17.540'; + return $GLOBALS['setup_info']['property']['currentver']; + } + } Index: templates/base/admin_entity.xsl =================================================================== RCS file: /sources/phpgroupware/property/templates/base/admin_entity.xsl,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- templates/base/admin_entity.xsl 18 Oct 2006 09:11:44 -0000 1.7 +++ templates/base/admin_entity.xsl 13 Oct 2007 10:02:54 -0000 1.8 @@ -1,4 +1,4 @@ -<!-- $Id: admin_entity.xsl,v 1.7 2006/10/18 09:11:44 sigurdne Exp $ --> +<!-- $Id: admin_entity.xsl,v 1.8 2007/10/13 10:02:54 sigurdne Exp $ --> <xsl:template name="app_data"> <xsl:choose> @@ -759,6 +759,37 @@ </tr> </xsl:when> </xsl:choose> + <xsl:choose> + <xsl:when test="lang_start_ticket != ''"> + <tr> + <td> + <xsl:value-of select="lang_start_ticket"/> + </td> + <td> + <xsl:choose> + <xsl:when test="value_start_ticket = 1"> + <input type="checkbox" name="values[start_ticket]" value="1" checked="checked" onMouseout="window.status='';return true;"> + <xsl:attribute name="onMouseover"> + <xsl:text>window.status='</xsl:text> + <xsl:value-of select="lang_start_ticket_statustext"/> + <xsl:text>'; return true;</xsl:text> + </xsl:attribute> + </input> + </xsl:when> + <xsl:otherwise> + <input type="checkbox" name="values[start_ticket]" value="1" onMouseout="window.status='';return true;"> + <xsl:attribute name="onMouseover"> + <xsl:text>window.status='</xsl:text> + <xsl:value-of select="lang_start_ticket_statustext"/> + <xsl:text>'; return true;</xsl:text> + </xsl:attribute> + </input> + </xsl:otherwise> + </xsl:choose> + </td> + </tr> + </xsl:when> + </xsl:choose> <xsl:choose> <xsl:when test="lang_location_level != ''"> Index: templates/base/entity.xsl =================================================================== RCS file: /sources/phpgroupware/property/templates/base/entity.xsl,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- templates/base/entity.xsl 14 Aug 2007 08:09:15 -0000 1.15 +++ templates/base/entity.xsl 13 Oct 2007 10:02:54 -0000 1.16 @@ -1,4 +1,4 @@ -<!-- $Id: entity.xsl,v 1.15 2007/08/14 08:09:15 sigurdne Exp $ --> +<!-- $Id: entity.xsl,v 1.16 2007/10/13 10:02:54 sigurdne Exp $ --> <xsl:template name="app_data"> <xsl:choose> @@ -228,6 +228,27 @@ </td> </tr> + <xsl:for-each select="value_destination" > + <xsl:variable name="link_destination_type"><xsl:value-of select="link"/></xsl:variable> + <tr> + <td class="th_text" valign ="top"> + <xsl:value-of select="descr"/> + </td> + <td> + <table> + <xsl:for-each select="data"> + <tr> + <td class="th_text" align="left" > + <a href="{$link_destination_type}&id={id}" onMouseover="window.status='{//lang_destination_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a> + <xsl:text> </xsl:text> + </td> + </tr> + </xsl:for-each> + </table> + </td> + </tr> + </xsl:for-each> + <xsl:for-each select="origin_list" > <xsl:variable name="link"><xsl:value-of select="link"/>&id=<xsl:value-of select="id"/></xsl:variable> <tr> @@ -477,6 +498,26 @@ </tr> </xsl:when> </xsl:choose> + <xsl:choose> + <xsl:when test="start_ticket!=''"> + <tr> + <td valign="top"> + <xsl:variable name="ticket_link"><xsl:value-of select="ticket_link"/></xsl:variable> + <form method="post" action="{$ticket_link}"> + <xsl:variable name="lang_start_ticket"><xsl:value-of select="lang_start_ticket"/></xsl:variable> + <input type="submit" name="location" value="{$lang_start_ticket}" onMouseout="window.status='';return true;"> + <xsl:attribute name="onMouseover"> + <xsl:text>window.status='</xsl:text> + <xsl:value-of select="lang_start_ticket_statustext"/> + <xsl:text>'; return true;</xsl:text> + </xsl:attribute> + </input> + </form> + </td> + </tr> + </xsl:when> + </xsl:choose> + </table> </div> @@ -546,6 +587,26 @@ </td> </tr> </xsl:for-each> + <xsl:for-each select="value_destination" > + <xsl:variable name="link_destination_type"><xsl:value-of select="link"/></xsl:variable> + <tr> + <td class="th_text" valign ="top"> + <xsl:value-of select="descr"/> + </td> + <td> + <table> + <xsl:for-each select="data"> + <tr> + <td class="th_text" align="left" > + <a href="{$link_destination_type}&id={id}" onMouseover="window.status='{//lang_destination_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a> + <xsl:text> </xsl:text> + </td> + </tr> + </xsl:for-each> + </table> + </td> + </tr> + </xsl:for-each> <tr> <td class="th_text"> <xsl:value-of select="lang_entity"/> Index: templates/base/tts.xsl =================================================================== RCS file: /sources/phpgroupware/property/templates/base/tts.xsl,v retrieving revision 1.19 retrieving revision 1.20 diff -u -b -r1.19 -r1.20 --- templates/base/tts.xsl 23 Aug 2007 13:29:35 -0000 1.19 +++ templates/base/tts.xsl 13 Oct 2007 10:02:54 -0000 1.20 @@ -1,4 +1,4 @@ -<!-- $Id: tts.xsl,v 1.19 2007/08/23 13:29:35 sigurdne Exp $ --> +<!-- $Id: tts.xsl,v 1.20 2007/10/13 10:02:54 sigurdne Exp $ --> <xsl:template name="app_data"> <xsl:choose> @@ -401,6 +401,29 @@ </xsl:choose> <xsl:variable name="form_action"><xsl:value-of select="form_action"/></xsl:variable> <form ENCTYPE="multipart/form-data" name="form" method="post" action="{$form_action}"> + <xsl:for-each select="value_origin" > + <xsl:variable name="link_origin_type"><xsl:value-of select="link"/></xsl:variable> + <tr> + <td valign ="top"> + <xsl:value-of select="descr"/> + </td> + <td> + <table> + <xsl:for-each select="data"> + <tr> + <td class="th_text" align="left" > + <xsl:variable name="link_request"><xsl:value-of select="//link_request"/>&id=<xsl:value-of select="id"/></xsl:variable> + <a href="{$link_origin_type}&id={id}" onMouseover="window.status='{//lang_origin_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a> + <xsl:text> </xsl:text> + </td> + </tr> + </xsl:for-each> + </table> + </td> + </tr> + </xsl:for-each> + <input type="hidden" name="values[origin]" value="{value_origin_type}"></input> + <input type="hidden" name="values[origin_id]" value="{value_origin_id}"></input> <xsl:call-template name="location_form"/> <tr> @@ -776,6 +799,27 @@ </input> </td> </tr> + <xsl:for-each select="value_origin" > + <xsl:variable name="link_origin_type"><xsl:value-of select="link"/></xsl:variable> + <tr> + <td valign ="top"> + <xsl:value-of select="descr"/> + </td> + <td> + <table> + <xsl:for-each select="data"> + <tr> + <td class="th_text" align="left" > + <xsl:variable name="link_request"><xsl:value-of select="//link_request"/>&id=<xsl:value-of select="id"/></xsl:variable> + <a href="{$link_origin_type}&id={id}" onMouseover="window.status='{//lang_origin_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a> + <xsl:text> </xsl:text> + </td> + </tr> + </xsl:for-each> + </table> + </td> + </tr> + </xsl:for-each> <xsl:call-template name="location_view"/> <xsl:choose> <xsl:when test="contact_phone !=''"> @@ -831,23 +875,21 @@ </td> </tr> - <xsl:for-each select="value_origin" > - <xsl:variable name="link_origin_type"><xsl:value-of select="link"/></xsl:variable> + <xsl:for-each select="value_destination" > + <xsl:variable name="link_destination_type"><xsl:value-of select="link"/></xsl:variable> <tr> <td class="th_text" valign ="top"> <xsl:value-of select="descr"/> </td> <td class="th_text" align="left" > <xsl:for-each select="data"> - <a href="{$link_origin_type}&id={id}" onMouseover="window.status='{//lang_origin_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a> + <a href="{$link_destination_type}&id={id}" onMouseover="window.status='{//lang_destination_statustext}';return true;" onMouseout="window.status='';return true;"><xsl:value-of select="id"/></a> <xsl:text> </xsl:text> </xsl:for-each> </td> </tr> </xsl:for-each> - - - +<!-- <xsl:for-each select="entity_origin_list" > <tr> <td class="th_text"> @@ -863,7 +905,7 @@ </td> </tr> </xsl:for-each> - <!-- <xsl:choose> + <xsl:choose> <xsl:when test="value_request_id!=''"> <tr> <td class="th_text" align="left" valign="top"> _______________________________________________ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs