- using new class naming schema

- version and dependencies for 1.6
- file_access hook for attachments
This commit is contained in:
Ralf Becker 2008-10-07 08:57:09 +00:00
parent 72115c0ae4
commit 38d3ac65ff
11 changed files with 218 additions and 212 deletions

View File

@ -12,7 +12,6 @@
*/ */
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_egw_record.inc.php'); require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_egw_record.inc.php');
require_once(EGW_INCLUDE_ROOT. '/timesheet/inc/class.botimesheet.inc.php');
/** /**
* class egw_addressbook_record * class egw_addressbook_record
@ -35,7 +34,7 @@ class egw_timesheet_record implements iface_egw_record
*/ */
public function __construct( $_identifier='' ){ public function __construct( $_identifier='' ){
$this->identifier = $_identifier; $this->identifier = $_identifier;
$this->botimesheet = new botimesheet(); $this->botimesheet = new timesheet_bo();
$this->timesheetentry = $this->botimesheet->read($this->identifier); $this->timesheetentry = $this->botimesheet->read($this->identifier);
} }
@ -149,4 +148,3 @@ class egw_timesheet_record implements iface_egw_record
} }
} // end of egw_timesheet_record } // end of egw_timesheet_record
?>

View File

@ -11,10 +11,7 @@
* @version $Id: $ * @version $Id: $
*/ */
require_once(EGW_INCLUDE_ROOT. '/etemplate/inc/class.etemplate.inc.php');
require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_export_plugin.inc.php'); require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.iface_export_plugin.inc.php');
require_once(EGW_INCLUDE_ROOT. '/timesheet/inc/class.uitimesheet.inc.php');
require_once(EGW_INCLUDE_ROOT. '/timesheet/inc/class.botimesheet.inc.php');
/** /**
* export plugin of addressbook * export plugin of addressbook
@ -32,7 +29,7 @@ class export_timesheet_openoffice implements iface_export_plugin {
$options = $_definition->options; $options = $_definition->options;
$botimesheet = new botimesheet(); $botimesheet = new timesheet_bo();
// get current display selection // get current display selection

View File

@ -7,7 +7,7 @@
* @package timesheet * @package timesheet
* @copyright (c) 2005-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de> * @copyright (c) 2005-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
if (!defined('TIMESHEET_APP')) if (!defined('TIMESHEET_APP'))
@ -20,7 +20,7 @@ if (!defined('TIMESHEET_APP'))
* *
* Uses eTemplate's so_sql as storage object (Table: egw_timesheet). * Uses eTemplate's so_sql as storage object (Table: egw_timesheet).
*/ */
class botimesheet extends so_sql class timesheet_bo extends so_sql
{ {
/** /**
* Timesheets config data * Timesheets config data
@ -36,34 +36,34 @@ class botimesheet extends so_sql
var $quantity_sum=false; var $quantity_sum=false;
/** /**
* Timestaps that need to be adjusted to user-time on reading or saving * Timestaps that need to be adjusted to user-time on reading or saving
* *
* @var array * @var array
*/ */
var $timestamps = array( var $timestamps = array(
'ts_start','ts_modified' 'ts_start','ts_modified'
); );
/** /**
* Offset in secconds between user and server-time, it need to be add to a server-time to get the user-time * Offset in secconds between user and server-time, it need to be add to a server-time to get the user-time
* or substracted from a user-time to get the server-time * or substracted from a user-time to get the server-time
* *
* @var int * @var int
*/ */
var $tz_offset_s; var $tz_offset_s;
/** /**
* Current time as timestamp in user-time * Current time as timestamp in user-time
* *
* @var int * @var int
*/ */
var $now; var $now;
/** /**
* Start of today in user-time * Start of today in user-time
* *
* @var int * @var int
*/ */
var $today; var $today;
/** /**
* Filter for search limiting the date-range * Filter for search limiting the date-range
* *
* @var array * @var array
*/ */
var $date_filters = array( // Start: year,month,day,week, End: year,month,day,week var $date_filters = array( // Start: year,month,day,week, End: year,month,day,week
@ -81,28 +81,28 @@ class botimesheet extends so_sql
); );
/** /**
* Grants: $GLOBALS['egw']->acl->get_grants(TIMESHEET_APP); * Grants: $GLOBALS['egw']->acl->get_grants(TIMESHEET_APP);
* *
* @var array * @var array
*/ */
var $grants; var $grants;
/** /**
* Sums of the last search in keys duration and price * Sums of the last search in keys duration and price
* *
* @var array * @var array
*/ */
var $summary; var $summary;
/** /**
* Array with boolean values in keys 'day', 'week' or 'month', for the sums to return in the search * Array with boolean values in keys 'day', 'week' or 'month', for the sums to return in the search
* *
* @var array * @var array
*/ */
var $show_sums; var $show_sums;
var $customfields=array(); var $customfields=array();
function botimesheet() function __construct()
{ {
$this->so_sql(TIMESHEET_APP,'egw_timesheet',null,'',true); // true = use global db object! parent::__construct(TIMESHEET_APP,'egw_timesheet',null,'',true); // true = use global db object!
$this->config_data = config::read(TIMESHEET_APP); $this->config_data = config::read(TIMESHEET_APP);
$this->quantity_sum = $this->config_data['quantity_sum'] == 'true'; $this->quantity_sum = $this->config_data['quantity_sum'] == 'true';
@ -116,14 +116,14 @@ class botimesheet extends so_sql
$this->now = time() + $this->tz_offset_s; // time() is server-time and we need a user-time $this->now = time() + $this->tz_offset_s; // time() is server-time and we need a user-time
$this->today = mktime(0,0,0,date('m',$this->now),date('d',$this->now),date('Y',$this->now)); $this->today = mktime(0,0,0,date('m',$this->now),date('d',$this->now),date('Y',$this->now));
// save us in $GLOBALS['botimesheet'] for ExecMethod used in hooks // save us in $GLOBALS['timesheet_bo'] for ExecMethod used in hooks
if (!is_object($GLOBALS['botimesheet'])) if (!is_object($GLOBALS['timesheet_bo']))
{ {
$GLOBALS['botimesheet'] =& $this; $GLOBALS['timesheet_bo'] =& $this;
} }
$this->grants = $GLOBALS['egw']->acl->get_grants(TIMESHEET_APP); $this->grants = $GLOBALS['egw']->acl->get_grants(TIMESHEET_APP);
} }
/** /**
* get list of specified grants as uid => Username pairs * get list of specified grants as uid => Username pairs
* *
@ -144,7 +144,7 @@ class botimesheet extends so_sql
return $result; return $result;
} }
/** /**
* checks if the user has enough rights for a certain operation * checks if the user has enough rights for a certain operation
* *
@ -165,14 +165,14 @@ class botimesheet extends so_sql
$save_data = $this->data; $save_data = $this->data;
$data = $this->read($data,true); $data = $this->read($data,true);
$this->data = $save_data; $this->data = $save_data;
if (!$data) return null; // entry not found if (!$data) return null; // entry not found
} }
$rights = $this->grants[$data['ts_owner']]; $rights = $this->grants[$data['ts_owner']];
return $data && !!($rights & $required); return $data && !!($rights & $required);
} }
function date_filter($name,&$start,&$end_param) function date_filter($name,&$start,&$end_param)
{ {
$end = $end_param; $end = $end_param;
@ -197,9 +197,9 @@ class botimesheet extends so_sql
$year = (int) date('Y',$this->today); $year = (int) date('Y',$this->today);
$month = (int) date('m',$this->today); $month = (int) date('m',$this->today);
$day = (int) date('d',$this->today); $day = (int) date('d',$this->today);
list($syear,$smonth,$sday,$sweek,$eyear,$emonth,$eday,$eweek) = $this->date_filters[$name]; list($syear,$smonth,$sday,$sweek,$eyear,$emonth,$eday,$eweek) = $this->date_filters[$name];
if ($syear || $eyear) if ($syear || $eyear)
{ {
$start = mktime(0,0,0,1,1,$syear+$year); $start = mktime(0,0,0,1,1,$syear+$year);
@ -236,7 +236,7 @@ class botimesheet extends so_sql
} }
$end_param = $end - 24*60*60; $end_param = $end - 24*60*60;
} }
//echo "<p align='right'>date_filter($name,$start,$end) today=".date('l, Y-m-d H:i',$this->today)." ==> ".date('l, Y-m-d H:i:s',$start)." <= date < ".date('l, Y-m-d H:i:s',$end)."</p>\n"; //echo "<p align='right'>date_filter($name,$start,$end) today=".date('l, Y-m-d H:i',$this->today)." ==> ".date('l, Y-m-d H:i:s',$start)." <= date < ".date('l, Y-m-d H:i:s',$end)."</p>\n";
// convert start + end from user to servertime for the filter // convert start + end from user to servertime for the filter
return '('.($start-$this->tz_offset_s).' <= ts_start AND ts_start < '.($end-$this->tz_offset_s).')'; return '('.($start-$this->tz_offset_s).' <= ts_start AND ts_start < '.($end-$this->tz_offset_s).')';
} }
@ -255,7 +255,7 @@ class botimesheet extends so_sql
* @param string $op='AND' defaults to 'AND', can be set to 'OR' too, then criteria's are OR'ed together * @param string $op='AND' defaults to 'AND', can be set to 'OR' too, then criteria's are OR'ed together
* @param mixed $start=false if != false, return only maxmatch rows begining with start, or array($start,$num) * @param mixed $start=false if != false, return only maxmatch rows begining with start, or array($start,$num)
* @param array $filter=null if set (!=null) col-data pairs, to be and-ed (!) into the query without wildcards * @param array $filter=null if set (!=null) col-data pairs, to be and-ed (!) into the query without wildcards
* @param string $join='' sql to do a join, added as is after the table-name, eg. ", table2 WHERE x=y" or * @param string $join='' sql to do a join, added as is after the table-name, eg. ", table2 WHERE x=y" or
* "LEFT JOIN table2 ON (x=y)", Note: there's no quoting done on $join! * "LEFT JOIN table2 ON (x=y)", Note: there's no quoting done on $join!
* @param boolean $need_full_no_count=false If true an unlimited query is run to determine the total number of rows, default false * @param boolean $need_full_no_count=false If true an unlimited query is run to determine the total number of rows, default false
* @param boolean $only_summary=false If true only return the sums as array with keys duration and price, default false * @param boolean $only_summary=false If true only return the sums as array with keys duration and price, default false
@ -280,7 +280,7 @@ class botimesheet extends so_sql
else else
{ {
if (!is_array($filter['ts_owner'])) $filter['ts_owner'] = array($filter['ts_owner']); if (!is_array($filter['ts_owner'])) $filter['ts_owner'] = array($filter['ts_owner']);
foreach($filter['ts_owner'] as $key => $owner) foreach($filter['ts_owner'] as $key => $owner)
{ {
if (!isset($this->grants[$owner])) if (!isset($this->grants[$owner]))
@ -299,7 +299,7 @@ class botimesheet extends so_sql
($this->quantity_sum ? ",SUM(ts_quantity) AS quantity" : ''), ($this->quantity_sum ? ",SUM(ts_quantity) AS quantity" : ''),
'','',$wildcard,$empty,$op,false,$filter,$join); '','',$wildcard,$empty,$op,false,$filter,$join);
$this->summary = $this->summary[0]; $this->summary = $this->summary[0];
if ($only_summary) return $this->summary; if ($only_summary) return $this->summary;
if ($this->show_sums && strpos($order_by,'ts_start') !== false && // sums only make sense if ordered by ts_start if ($this->show_sums && strpos($order_by,'ts_start') !== false && // sums only make sense if ordered by ts_start
@ -320,7 +320,7 @@ class botimesheet extends so_sql
} }
// regular entries // regular entries
parent::search($criteria,$only_keys,$order_by,$extra_cols,$wildcard,$empty,$op,'UNION',$filter,$join,$need_full_no_count); parent::search($criteria,$only_keys,$order_by,$extra_cols,$wildcard,$empty,$op,'UNION',$filter,$join,$need_full_no_count);
$sort = substr($order_by,8); $sort = substr($order_by,8);
$union_order = array(); $union_order = array();
$sum_ts_id = array('year' => -3,'month' => -2,'week' => -1,'day' => 0); $sum_ts_id = array('year' => -3,'month' => -2,'week' => -1,'day' => 0);
@ -381,7 +381,7 @@ class botimesheet extends so_sql
return $this->db->select('egw_timesheet_extra', 'ts_extra_name, ts_extra_value',$query,__LINE__,__FILE__,False,'', return $this->db->select('egw_timesheet_extra', 'ts_extra_name, ts_extra_value',$query,__LINE__,__FILE__,False,'',
TIMESHEET_APP,0,'where ts_id='.$this->data['ts_id'].$where)->fetch(); TIMESHEET_APP,0,'where ts_id='.$this->data['ts_id'].$where)->fetch();
} }
/** /**
* saves a timesheet entry * saves a timesheet entry
* *
@ -395,7 +395,7 @@ class botimesheet extends so_sql
function save($keys=null,$touch_modified=true,$ignore_acl=false) function save($keys=null,$touch_modified=true,$ignore_acl=false)
{ {
if ($keys) $this->data_merge($keys); if ($keys) $this->data_merge($keys);
if (!$ignore_acl && $this->data['ts_id'] && !$this->check_acl(EGW_ACL_EDIT)) if (!$ignore_acl && $this->data['ts_id'] && !$this->check_acl(EGW_ACL_EDIT))
{ {
return true; return true;
@ -433,16 +433,16 @@ class botimesheet extends so_sql
return true; return true;
} }
else { else {
foreach($this->customfields as $namecf => $valuecf) foreach($this->customfields as $namecf => $valuecf)
{ {
//if entry not exist => insert //if entry not exist => insert
if(!$this->read_extra($namecf)) if(!$this->read_extra($namecf))
{ {
$fieldAssign = array('ts_id' => $this->data['ts_id'],'ts_extra_name' => $namecf,'ts_extra_value' => $this->data['#'.$namecf]); $fieldAssign = array('ts_id' => $this->data['ts_id'],'ts_extra_name' => $namecf,'ts_extra_value' => $this->data['#'.$namecf]);
$this->db->insert('egw_timesheet_extra',$fieldAssign,false,__LINE__,__FILE__,TIMESHEET_APP); $this->db->insert('egw_timesheet_extra',$fieldAssign,false,__LINE__,__FILE__,TIMESHEET_APP);
} }
//otherwise update existing dataset //otherwise update existing dataset
else else
{ {
$keys = array('ts_extra_name' => $namecf, 'ts_id' => $this->data['ts_id']); $keys = array('ts_extra_name' => $namecf, 'ts_id' => $this->data['ts_id']);
$fieldAssign = array('ts_extra_value' => $this->data['#'.$namecf]); $fieldAssign = array('ts_extra_value' => $this->data['#'.$namecf]);
@ -453,7 +453,7 @@ class botimesheet extends so_sql
} }
return false; return false;
} }
/** /**
* deletes a timesheet entry identified by $keys or the loaded one, reimplemented to notify the link class (unlink) * deletes a timesheet entry identified by $keys or the loaded one, reimplemented to notify the link class (unlink)
* *
@ -468,7 +468,7 @@ class botimesheet extends so_sql
$keys = array('ts_id' => (int) $keys); $keys = array('ts_id' => (int) $keys);
} }
$ts_id = is_null($keys) ? $this->data['ts_id'] : $keys['ts_id']; $ts_id = is_null($keys) ? $this->data['ts_id'] : $keys['ts_id'];
if (!$this->check_acl(EGW_ACL_DELETE,$ts_id)) if (!$this->check_acl(EGW_ACL_DELETE,$ts_id))
{ {
return false; return false;
@ -497,7 +497,7 @@ class botimesheet extends so_sql
strlen($ts_id) > 0 ? $where['ts_id'] = $ts_id : ''; strlen($ts_id) > 0 ? $where['ts_id'] = $ts_id : '';
strlen($ts_extra_name) > 0 ? $where['ts_extra_name'] = $ts_extra_name : ''; strlen($ts_extra_name) > 0 ? $where['ts_extra_name'] = $ts_extra_name : '';
if(count($where) > 0) if(count($where) > 0)
{ {
return $this->db->delete('egw_timesheet_extra', $where,__LINE__,__FILE__,TIMESHEET_APP); return $this->db->delete('egw_timesheet_extra', $where,__LINE__,__FILE__,TIMESHEET_APP);
} }
@ -547,7 +547,7 @@ class botimesheet extends so_sql
} }
return $data; return $data;
} }
/** /**
* Get the time- and pricesum for the given timesheet entries * Get the time- and pricesum for the given timesheet entries
* *
@ -558,10 +558,10 @@ class botimesheet extends so_sql
{ {
return $this->search(array('ts_id'=>$ids),true,'','','',false,'AND',false,null,'',false,true); return $this->search(array('ts_id'=>$ids),true,'','','',false,'AND',false,null,'',false,true);
} }
/** /**
* get title for a timesheet entry identified by $entry * get title for a timesheet entry identified by $entry
* *
* Is called as hook to participate in the linking * Is called as hook to participate in the linking
* *
* @param int/array $entry int ts_id or array with timesheet entry * @param int/array $entry int ts_id or array with timesheet entry
@ -587,7 +587,7 @@ class botimesheet extends so_sql
/** /**
* get title for multiple timesheet entries identified by $ids * get title for multiple timesheet entries identified by $ids
* *
* Is called as hook to participate in the linking * Is called as hook to participate in the linking
* *
* @param array $ids array with ts_id's * @param array $ids array with ts_id's
@ -638,57 +638,20 @@ class botimesheet extends so_sql
} }
/** /**
* Hook called by link-class to include timesheet in the appregistry of the linkage * Check access to the projects file store
* *
* @param array/string $location location and other parameters (not used) * We currently map file access rights:
* @return array with method-names * - file read rights = project read rights
*/ * - file write or delete rights = project edit rights
function search_link($location)
{
return array(
'query' => TIMESHEET_APP.'.botimesheet.link_query',
'title' => TIMESHEET_APP.'.botimesheet.link_title',
'titles'=> TIMESHEET_APP.'.botimesheet.link_titles',
'view' => array(
'menuaction' => TIMESHEET_APP.'.uitimesheet.view',
),
'view_id' => 'ts_id',
'view_popup' => '600x400',
'add' => array(
'menuaction' => TIMESHEET_APP.'.uitimesheet.edit',
),
'add_app' => 'link_app',
'add_id' => 'link_id',
'add_popup' => '600x400',
);
}
/**
* Return the timesheets linked with given project(s) AND with entries of other apps, which are also linked to the same project
*
* Projectmanager will cumulate them in the other apps entries.
* *
* @param array $param int/array $param['pm_id'] project-id(s) * @ToDo Implement own acl rights for file access
* @return array with pm_id, pe_id, pe_app('timesheet'), pe_app_id(ts_id), other_id, other_app, other_app_id * @param int $id pm_id of project
* @param int $check EGW_ACL_READ for read and EGW_ACL_EDIT for write or delete access
* @return boolean true if access is granted or false otherwise
*/ */
function cumulate($param) function file_access($id,$check,$rel_path)
{ {
$links = egw_link::get_3links(TIMESHEET_APP,'projectmanager',$param['pm_id']); return $this->check_acl($check,$id);
$rows = array();
foreach($links as $link)
{
$rows[$link['id']] = array(
'pm_id' => $link['id2'],
'pe_id' => $link['id'],
'pe_app' => $link['app1'],
'pe_app_id' => $link['id1'],
'other_id' => $link['link3'],
'other_app' => $link['app3'],
'other_app_id'=> $link['id3'],
);
}
return $rows;
} }
/** /**
@ -702,7 +665,7 @@ class botimesheet extends so_sql
*/ */
function update_ts_project($oldtitle='', $newtitle='') function update_ts_project($oldtitle='', $newtitle='')
{ {
if(strlen($oldtitle) > 0 && strlen($newtitle) > 0) if(strlen($oldtitle) > 0 && strlen($newtitle) > 0)
{ {
$this->db->update('egw_timesheet',array( $this->db->update('egw_timesheet',array(
'ts_project' => $newtitle, 'ts_project' => $newtitle,
@ -721,11 +684,11 @@ class botimesheet extends so_sql
* *
* @param int $pm_id ID of selected project * @param int $pm_id ID of selected project
* @return array containing link_id and ts_id * @return array containing link_id and ts_id
*/ */
function get_ts_links($pm_id=0) function get_ts_links($pm_id=0)
{ {
if($pm_id && isset($GLOBALS['egw_info']['user']['apps']['projectmanager'])) if($pm_id && isset($GLOBALS['egw_info']['user']['apps']['projectmanager']))
{ {
$pm_ids = ExecMethod('projectmanager.boprojectmanager.children',$pm_id); $pm_ids = ExecMethod('projectmanager.boprojectmanager.children',$pm_id);
$pm_ids[] = $pm_id; $pm_ids[] = $pm_id;
$links = solink::get_links('projectmanager',$pm_ids,'timesheet'); // solink::get_links not egw_links::get_links! $links = solink::get_links('projectmanager',$pm_ids,'timesheet'); // solink::get_links not egw_links::get_links!

View File

@ -5,46 +5,45 @@
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package timesheet * @package timesheet
* @copyright (c) 2005 by Ralf Becker <RalfBecker-AT-outdoor-training.de> * @copyright (c) 2005-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
include_once(EGW_INCLUDE_ROOT.'/projectmanager/inc/class.datasource.inc.php'); include_once(EGW_INCLUDE_ROOT.'/projectmanager/inc/class.datasource.inc.php');
include_once(EGW_INCLUDE_ROOT.'/timesheet/inc/class.botimesheet.inc.php');
/** /**
* Projectmanager DataSource for the TimeSheet * Projectmanager DataSource for the TimeSheet
*/ */
class datasource_timesheet extends datasource class timesheet_datasource extends datasource
{ {
/** /**
* Constructor * Constructor
*/ */
function datasource_timesheet() function __construct()
{ {
$this->datasource(TIMESHEET_APP); parent::__construct(TIMESHEET_APP);
$this->valid = PM_REAL_START|PM_REAL_END|PM_USED_TIME|PM_USED_BUDGET|PM_USED_QUANTITY| $this->valid = PM_REAL_START|PM_REAL_END|PM_USED_TIME|PM_USED_BUDGET|PM_USED_QUANTITY|
PM_PRICELIST_ID|PM_UNITPRICE|PM_RESOURCES|PM_DETAILS|PM_COMPLETION; PM_PRICELIST_ID|PM_UNITPRICE|PM_RESOURCES|PM_DETAILS|PM_COMPLETION;
} }
/** /**
* get an entry from the underlaying app (if not given) and convert it into a datasource array * get an entry from the underlaying app (if not given) and convert it into a datasource array
* *
* @param mixed $data_id id as used in the link-class for that app, or complete entry as array * @param mixed $data_id id as used in the link-class for that app, or complete entry as array
* @return array/boolean array with the data supported by that source or false on error (eg. not found, not availible) * @return array/boolean array with the data supported by that source or false on error (eg. not found, not availible)
*/ */
function get($data_id) function get($data_id)
{ {
// we use $GLOBALS['bocal'] as an already running instance is availible there // we use $GLOBALS['timesheet_bo'] as an already running instance is availible there
if (!is_object($GLOBALS['botimesheet'])) if (!is_object($GLOBALS['timesheet_bo']))
{ {
$GLOBALS['botimesheet'] =& new botimesheet(); $GLOBALS['timesheet_bo'] =& new timesheet_bo();
} }
if (!is_array($data_id)) if (!is_array($data_id))
{ {
if (!(int) $data_id || !($data = $GLOBALS['botimesheet']->read((int) $data_id))) if (!(int) $data_id || !($data = $GLOBALS['timesheet_bo']->read((int) $data_id)))
{ {
return false; return false;
} }
@ -54,7 +53,7 @@ class datasource_timesheet extends datasource
$data =& $data_id; $data =& $data_id;
} }
$ds = array( $ds = array(
'pe_title' => $GLOBALS['botimesheet']->link_title($data), 'pe_title' => $GLOBALS['timesheet_bo']->link_title($data),
'pe_real_start' => $data['ts_start'], 'pe_real_start' => $data['ts_start'],
'pe_resources' => array($data['ts_owner']), 'pe_resources' => array($data['ts_owner']),
'pe_details' => $data['ts_description'] ? nl2br($data['ts_description']) : '', 'pe_details' => $data['ts_description'] ? nl2br($data['ts_description']) : '',
@ -89,7 +88,7 @@ class datasource_timesheet extends datasource
{ {
return false; return false;
} }
/** /**
* Delete the datasource of a project element * Delete the datasource of a project element
* *
@ -99,11 +98,11 @@ class datasource_timesheet extends datasource
/* removed deleting, as it might not be always wanted, maybe we make it configurable later on /* removed deleting, as it might not be always wanted, maybe we make it configurable later on
function delete($id) function delete($id)
{ {
if (!is_object($GLOBALS['botimesheet'])) if (!is_object($GLOBALS['timesheet_bo']))
{ {
$GLOBALS['botimesheet'] =& new botimesheet(); $GLOBALS['timesheet_bo'] = new timesheet_boo();
} }
return $GLOBALS['botimesheet']->delete($id); return $GLOBALS['timesheet_bo']->delete($id);
} }
*/ */
} }

View File

@ -1,13 +1,13 @@
<?php <?php
/** /**
* TimeSheet - Admin-, Preferences- and SideboxMenu-Hooks * TimeSheet - diverse hooks: Admin-, Preferences- and SideboxMenu-Hooks
* *
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package timesheet * @package timesheet
* @copyright (c) 2005 by Ralf Becker <RalfBecker-AT-outdoor-training.de> * @copyright (c) 2005-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
if (!defined('TIMESHEET_APP')) if (!defined('TIMESHEET_APP'))
@ -15,19 +15,65 @@ if (!defined('TIMESHEET_APP'))
define('TIMESHEET_APP','timesheet'); define('TIMESHEET_APP','timesheet');
} }
class ts_admin_prefs_sidebox_hooks /**
* diverse hooks as static methods
*
*/
class timesheet_hooks
{ {
var $public_functions = array( /**
// 'check_set_default_prefs' => true, * Hook called by link-class to include timesheet in the appregistry of the linkage
); *
var $config = array(); * @param array/string $location location and other parameters (not used)
* @return array with method-names
function pm_admin_prefs_sidebox_hooks() */
static function search_link($location)
{ {
$config =& CreateObject('phpgwapi.config',TIMESHEET_APP); return array(
$config->read_repository(); 'query' => TIMESHEET_APP.'.timesheet_bo.link_query',
$this->config =& $config->config_data; 'title' => TIMESHEET_APP.'.timesheet_bo.link_title',
unset($config); 'titles'=> TIMESHEET_APP.'.timesheet_bo.link_titles',
'view' => array(
'menuaction' => TIMESHEET_APP.'.timesheet_ui.view',
),
'view_id' => 'ts_id',
'view_popup' => '600x400',
'add' => array(
'menuaction' => TIMESHEET_APP.'.timesheet_ui.edit',
),
'add_app' => 'link_app',
'add_id' => 'link_id',
'add_popup' => '600x400',
'file_access'=> TIMESHEET_APP.'.timesheet_bo.file_access',
);
}
/**
* Return the timesheets linked with given project(s) AND with entries of other apps, which are also linked to the same project
*
* Projectmanager will cumulate them in the other apps entries.
*
* @param array $param int/array $param['pm_id'] project-id(s)
* @return array with pm_id, pe_id, pe_app('timesheet'), pe_app_id(ts_id), other_id, other_app, other_app_id
*/
static function cumulate($param)
{
$links = egw_link::get_3links(TIMESHEET_APP,'projectmanager',$param['pm_id']);
$rows = array();
foreach($links as $link)
{
$rows[$link['id']] = array(
'pm_id' => $link['id2'],
'pe_id' => $link['id'],
'pe_app' => $link['app1'],
'pe_app_id' => $link['id1'],
'other_id' => $link['link3'],
'other_app' => $link['app3'],
'other_app_id'=> $link['id3'],
);
}
return $rows;
} }
/** /**
@ -35,7 +81,7 @@ class ts_admin_prefs_sidebox_hooks
* *
* @param string/array $args hook args * @param string/array $args hook args
*/ */
function all_hooks($args) static function all_hooks($args)
{ {
$appname = TIMESHEET_APP; $appname = TIMESHEET_APP;
$location = is_array($args) ? $args['location'] : $args; $location = is_array($args) ? $args['location'] : $args;
@ -85,23 +131,23 @@ class ts_admin_prefs_sidebox_hooks
} }
} }
} }
/** /**
* populates $GLOBALS['settings'] for the preferences * populates $GLOBALS['settings'] for the preferences
*/ */
function settings() static function settings()
{ {
$this->check_set_default_prefs(); self::check_set_default_prefs();
return true; // otherwise prefs say it cant find the file ;-) return true; // otherwise prefs say it cant find the file ;-)
} }
/** /**
* Check if reasonable default preferences are set and set them if not * Check if reasonable default preferences are set and set them if not
* *
* It sets a flag in the app-session-data to be called only once per session * It sets a flag in the app-session-data to be called only once per session
*/ */
function check_set_default_prefs() static function check_set_default_prefs()
{ {
if ($GLOBALS['egw']->session->appsession('default_prefs_set',TIMESHEET_APP)) if ($GLOBALS['egw']->session->appsession('default_prefs_set',TIMESHEET_APP))
{ {

View File

@ -10,12 +10,10 @@
* @version $Id$ * @version $Id$
*/ */
require_once(EGW_INCLUDE_ROOT.'/timesheet/inc/class.botimesheet.inc.php');
/** /**
* User interface object of the TimeSheet * User interface object of the TimeSheet
*/ */
class uitimesheet extends botimesheet class timesheet_ui extends timesheet_bo
{ {
var $public_functions = array( var $public_functions = array(
'view' => true, 'view' => true,
@ -36,9 +34,13 @@ class uitimesheet extends botimesheet
*/ */
var $ts_viewtype; var $ts_viewtype;
function uitimesheet() /**
* Constructor
*
*/
function __construct()
{ {
$this->botimesheet(); parent::__construct();
$this->pm_integration = $this->config_data['pm_integration']; $this->pm_integration = $this->config_data['pm_integration'];
$this->ts_viewtype = $this->config_data['ts_viewtype']; $this->ts_viewtype = $this->config_data['ts_viewtype'];
@ -83,7 +85,7 @@ class uitimesheet extends botimesheet
); );
} }
$referer = preg_match('/menuaction=([^&]+)/',$_SERVER['HTTP_REFERER'],$matches) ? $matches[1] : $referer = preg_match('/menuaction=([^&]+)/',$_SERVER['HTTP_REFERER'],$matches) ? $matches[1] :
(strpos($_SERVER['HTTP_REFERER'],'/infolog/index.php') !== false ? 'infolog.uiinfolog.index' : TIMESHEET_APP.'.uitimesheet.index'); (strpos($_SERVER['HTTP_REFERER'],'/infolog/index.php') !== false ? 'infolog.uiinfolog.index' : TIMESHEET_APP.'.timesheet_ui.index');
} }
else else
{ {
@ -333,7 +335,7 @@ class uitimesheet extends botimesheet
} }
if (!$this->customfields) $readonlys[$tabs]['customfields'] = true; // suppress tab if there are not customfields if (!$this->customfields) $readonlys[$tabs]['customfields'] = true; // suppress tab if there are not customfields
return $etpl->exec(TIMESHEET_APP.'.uitimesheet.edit',$content,array( return $etpl->exec(TIMESHEET_APP.'.timesheet_ui.edit',$content,array(
'ts_owner' => $edit_grants, 'ts_owner' => $edit_grants,
),$readonlys,$preserv,2); ),$readonlys,$preserv,2);
} }
@ -626,7 +628,7 @@ class uitimesheet extends botimesheet
$date_filters['custom'] = 'custom'; $date_filters['custom'] = 'custom';
$content['nm'] = array( $content['nm'] = array(
'get_rows' => TIMESHEET_APP.'.uitimesheet.get_rows', 'get_rows' => TIMESHEET_APP.'.timesheet_ui.get_rows',
'options-filter' => $date_filters, 'options-filter' => $date_filters,
'options-filter2' => array('No details','Details'), 'options-filter2' => array('No details','Details'),
'order' => 'ts_start',// IO name of the column to sort after (optional for the sortheaders) 'order' => 'ts_start',// IO name of the column to sort after (optional for the sortheaders)
@ -654,11 +656,9 @@ class uitimesheet extends botimesheet
// dont show [Export] button if app is not availible to the user or we are on php4 // dont show [Export] button if app is not availible to the user or we are on php4
$readonlys['export'] = !$GLOBALS['egw_info']['user']['apps']['importexport'] || (int) phpversion() < 5; $readonlys['export'] = !$GLOBALS['egw_info']['user']['apps']['importexport'] || (int) phpversion() < 5;
return $etpl->exec(TIMESHEET_APP.'.uitimesheet.index',$content,$sel_options,$readonlys,$preserv); return $etpl->exec(TIMESHEET_APP.'.timesheet_ui.index',$content,$sel_options,$readonlys,$preserv);
} }
function js() function js()
{ {
return '<script LANGUAGE="JavaScript"> return '<script LANGUAGE="JavaScript">
@ -672,5 +672,4 @@ class uitimesheet extends botimesheet
} }
</script>'; </script>';
} }
} }

View File

@ -7,7 +7,7 @@
* @package timesheet * @package timesheet
* @copyright (c) 2005 by Ralf Becker <RalfBecker-AT-outdoor-training.de> * @copyright (c) 2005 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
include_once('setup/setup.inc.php'); include_once('setup/setup.inc.php');
@ -16,7 +16,7 @@ unset($setup_info);
$GLOBALS['egw_info'] = array( $GLOBALS['egw_info'] = array(
'flags' => array( 'flags' => array(
'currentapp' => TIMESHEET_APP, 'currentapp' => TIMESHEET_APP,
'noheader' => True, 'noheader' => True,
'nonavbar' => True 'nonavbar' => True
)); ));
@ -34,4 +34,4 @@ if ($ts_version != $GLOBALS['egw_info']['apps'][TIMESHEET_APP]['version'])
//ExecMethod(TIMESHEET_APP.'.pm_admin_prefs_sidebox_hooks.check_set_default_prefs'); //ExecMethod(TIMESHEET_APP.'.pm_admin_prefs_sidebox_hooks.check_set_default_prefs');
$GLOBALS['egw']->redirect_link('/index.php',array('menuaction'=>TIMESHEET_APP.'.uitimesheet.index')); $GLOBALS['egw']->redirect_link('/index.php',array('menuaction'=>TIMESHEET_APP.'.timesheet_ui.index'));

View File

@ -2,7 +2,7 @@
/** /**
* eGroupWare - eTemplates for Application timesheet * eGroupWare - eTemplates for Application timesheet
* http://www.egroupware.org * http://www.egroupware.org
* generated by soetemplate::dump4setup() 2008-08-04 15:06 * generated by soetemplate::dump4setup() 2008-10-07 11:25
* *
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package timesheet * @package timesheet
@ -40,15 +40,15 @@ $templ_data[] = array('name' => 'timesheet.edit.notes','template' => '','lang' =
$templ_data[] = array('name' => 'timesheet.edit.notes','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:7:"row,top";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"8,70";s:4:"name";s:14:"ts_description";s:4:"span";s:10:",fullWidth";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:8:"100%,150";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"150";}}}','size' => '100%,150','style' => '','modified' => '1134773787',); $templ_data[] = array('name' => 'timesheet.edit.notes','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:7:"row,top";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"8,70";s:4:"name";s:14:"ts_description";s:4:"span";s:10:",fullWidth";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:8:"100%,150";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"150";}}}','size' => '100%,150','style' => '','modified' => '1134773787',);
$templ_data[] = array('name' => 'timesheet.index','template' => '','lang' => '','group' => '0','version' => '1.3.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:3:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:2:",1";s:2:"c4";s:7:"noPrint";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:5:"dates";}i:2;a:3:{s:4:"type";s:8:"template";s:4:"name";s:3:"add";s:5:"align";s:5:"right";}}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:20:"timesheet.index.rows";}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:163:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}}i:5;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Export";s:7:"onclick";s:33:"timesheet_export(); return false;";s:4:"name";s:6:"export";}}}s:4:"rows";i:5;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1164373176',);
$templ_data[] = array('name' => 'timesheet.index','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:4:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:2:",1";s:2:"c4";s:7:"noPrint";s:2:"h5";s:2:",1";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:5:"dates";}i:2;a:3:{s:4:"type";s:8:"template";s:4:"name";s:3:"add";s:5:"align";s:5:"right";}}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:20:"timesheet.index.rows";}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:163:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}}i:5;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Export";s:7:"onclick";s:33:"timesheet_export(); return false;";s:4:"name";s:6:"export";}}}s:4:"rows";i:5;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1164373176',); $templ_data[] = array('name' => 'timesheet.index','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:4:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:2:",1";s:2:"c4";s:7:"noPrint";s:2:"h5";s:2:",1";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:5:"dates";}i:2;a:3:{s:4:"type";s:8:"template";s:4:"name";s:3:"add";s:5:"align";s:5:"right";}}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:20:"timesheet.index.rows";}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:163:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}}i:5;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Export";s:7:"onclick";s:33:"timesheet_export(); return false;";s:4:"name";s:6:"export";}}}s:4:"rows";i:5;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1164373176',);
$templ_data[] = array('name' => 'timesheet.index.add','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:163:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}}','size' => '','style' => '','modified' => '1158042543',); $templ_data[] = array('name' => 'timesheet.index','template' => '','lang' => '','group' => '0','version' => '1.5.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:4:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:2:",1";s:2:"c4";s:7:"noPrint";s:2:"h5";s:2:",1";}i:1;a:1:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:5:"dates";}i:2;a:3:{s:4:"type";s:8:"template";s:4:"name";s:3:"add";s:5:"align";s:5:"right";}}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:20:"timesheet.index.rows";}}i:4;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:164:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.edit\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}}i:5;a:1:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Export";s:7:"onclick";s:33:"timesheet_export(); return false;";s:4:"name";s:6:"export";}}}s:4:"rows";i:5;s:4:"cols";i:1;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1164373176',);
$templ_data[] = array('name' => 'timesheet.index.add','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:164:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.edit\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}}','size' => '','style' => '','modified' => '1158042543',);
$templ_data[] = array('name' => 'timesheet.index.dates','template' => '','lang' => '','group' => '0','version' => '1.2.001','data' => 'a:1:{i:0;a:10:{s:4:"type";s:4:"hbox";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Start";}i:2;a:2:{s:4:"type";s:4:"date";s:4:"name";s:9:"startdate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"End";}i:4;a:3:{s:4:"type";s:4:"date";s:4:"name";s:7:"enddate";s:4:"help";s:30:"Leave it empty for a full week";}s:4:"span";s:12:",custom_hide";}}','size' => '','style' => '.custom_hide { visibility: hidden; }','modified' => '1142973260',); $templ_data[] = array('name' => 'timesheet.index.dates','template' => '','lang' => '','group' => '0','version' => '1.2.001','data' => 'a:1:{i:0;a:10:{s:4:"type";s:4:"hbox";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Start";}i:2;a:2:{s:4:"type";s:4:"date";s:4:"name";s:9:"startdate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"End";}i:4;a:3:{s:4:"type";s:4:"date";s:4:"name";s:7:"enddate";s:4:"help";s:30:"Leave it empty for a full week";}s:4:"span";s:12:",custom_hide";}}','size' => '','style' => '.custom_hide { visibility: hidden; }','modified' => '1142973260',);
$templ_data[] = array('name' => 'timesheet.index.rows','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:6:{s:2:"c1";s:2:"th";s:2:"c2";s:16:"$row_cont[class]";s:1:"A";s:3:"15%";s:1:"B";s:3:"50%";s:1:"H";s:14:",@no_owner_col";s:1:"C";s:11:",@no_cat_id";}i:1;a:9:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Date";s:4:"name";s:8:"ts_start";}s:1:"B";a:7:{s:4:"type";s:4:"grid";s:7:"no_lang";s:1:"1";s:4:"data";a:4:{i:0;a:2:{s:2:"h1";s:21:",@pm_integration=full";s:2:"h2";s:22:",!@pm_integration=full";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:12:"All projects";s:4:"name";s:10:"ts_project";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-customfilter";s:4:"size";s:34:"projectmanager-select,All projects";s:4:"name";s:5:"pm_id";s:8:"onchange";i:1;}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:8:"ts_title";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:7:"options";a:2:{i:4;s:1:"1";i:5;s:1:"1";}s:4:"size";s:7:",,,,1,1";}s:1:"C";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Duration";s:4:"name";s:11:"ts_duration";}i:2;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:8:"duration";s:4:"size";s:6:",h,,,1";s:8:"readonly";s:1:"1";}}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:11:"ts_quantity";}s:1:"F";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Price";s:4:"name";s:12:"ts_unitprice";}s:1:"G";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Total";s:4:"name";s:8:"ts_total";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:5:"price";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,2";}}s:1:"H";a:5:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:8:"ts_owner";s:4:"size";s:4:"User";s:7:"no_lang";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:4:"span";s:8:",noPrint";}}i:2;a:9:{s:1:"A";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[ts_start]";s:8:"readonly";s:1:"1";s:4:"size";s:2:",8";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:4:"link";s:4:"name";s:15:"${row}[ts_link]";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[ts_title]";s:7:"no_lang";s:1:"1";s:4:"span";s:22:",$row_cont[titleClass]";}i:3;a:3:{s:4:"type";s:5:"label";s:4:"name";s:22:"${row}[ts_description]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:10:"select-cat";s:8:"readonly";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:4:"span";s:7:",noWrap";}s:1:"D";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:19:"${row}[ts_duration]";s:8:"readonly";s:1:"1";s:4:"size";s:6:",h,,,1";}s:1:"E";a:5:{s:4:"type";s:5:"float";s:4:"name";s:19:"${row}[ts_quantity]";s:7:"no_lang";s:1:"1";s:4:"size";s:4:",,,3";s:8:"readonly";s:1:"1";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[ts_unitprice]";}s:1:"G";a:5:{s:4:"type";s:5:"float";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[ts_total]";s:4:"size";s:4:",,,2";s:8:"readonly";s:1:"1";}s:1:"H";a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:16:"${row}[ts_owner]";s:8:"readonly";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"View";s:4:"name";s:22:"view[$row_cont[ts_id]]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.view&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:4:"help";s:15:"View this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:22:"edit[$row_cont[ts_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:24:"delete[$row_cont[ts_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:9;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1134799629',);
$templ_data[] = array('name' => 'timesheet.index.rows','template' => '','lang' => '','group' => '0','version' => '1.3.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:8:{s:2:"c1";s:2:"th";s:2:"c2";s:16:"$row_cont[class]";s:1:"A";s:3:"15%";s:1:"B";s:3:"50%";s:1:"H";s:14:",@no_owner_col";s:1:"G";s:13:",@ts_viewtype";s:1:"F";s:13:",@ts_viewtype";s:1:"E";s:13:",@ts_viewtype";}i:1;a:9:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Date";s:4:"name";s:8:"ts_start";}s:1:"B";a:7:{s:4:"type";s:4:"grid";s:7:"no_lang";s:1:"1";s:4:"data";a:4:{i:0;a:2:{s:2:"h1";s:21:",@pm_integration=full";s:2:"h2";s:22:",!@pm_integration=full";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:12:"All projects";s:4:"name";s:10:"ts_project";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-customfilter";s:4:"size";s:34:"projectmanager-select,All projects";s:4:"name";s:5:"pm_id";s:8:"onchange";i:1;}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:8:"ts_title";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:7:"options";a:2:{i:4;s:1:"1";i:5;s:1:"1";}s:4:"size";s:7:",,,,1,1";}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Duration";s:4:"name";s:11:"ts_duration";}i:2;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:8:"duration";s:4:"size";s:6:",h,,,1";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:11:"ts_quantity";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:8:"quantity";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,3";}}s:1:"F";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Price";s:4:"name";s:12:"ts_unitprice";}s:1:"G";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Total";s:4:"name";s:8:"ts_total";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:5:"price";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,2";}}s:1:"H";a:5:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:8:"ts_owner";s:4:"size";s:4:"User";s:7:"no_lang";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:4:"span";s:8:",noPrint";}}i:2;a:9:{s:1:"A";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[ts_start]";s:8:"readonly";s:1:"1";s:4:"size";s:2:",8";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:4:"link";s:4:"name";s:15:"${row}[ts_link]";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[ts_title]";s:7:"no_lang";s:1:"1";s:4:"span";s:22:",$row_cont[titleClass]";}i:3;a:3:{s:4:"type";s:5:"label";s:4:"name";s:22:"${row}[ts_description]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:10:"select-cat";s:8:"readonly";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:4:"span";s:7:",noWrap";}s:1:"D";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:19:"${row}[ts_duration]";s:8:"readonly";s:1:"1";s:4:"size";s:6:",h,,,1";}s:1:"E";a:5:{s:4:"type";s:5:"float";s:4:"name";s:19:"${row}[ts_quantity]";s:7:"no_lang";s:1:"1";s:4:"size";s:4:",,,3";s:8:"readonly";s:1:"1";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[ts_unitprice]";}s:1:"G";a:5:{s:4:"type";s:5:"float";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[ts_total]";s:4:"size";s:4:",,,2";s:8:"readonly";s:1:"1";}s:1:"H";a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:16:"${row}[ts_owner]";s:8:"readonly";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"View";s:4:"name";s:22:"view[$row_cont[ts_id]]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.view&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:4:"help";s:15:"View this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:22:"edit[$row_cont[ts_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:24:"delete[$row_cont[ts_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:9;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1164279120',); $templ_data[] = array('name' => 'timesheet.index.rows','template' => '','lang' => '','group' => '0','version' => '1.3.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:8:{s:2:"c1";s:2:"th";s:2:"c2";s:16:"$row_cont[class]";s:1:"A";s:3:"15%";s:1:"B";s:3:"50%";s:1:"H";s:14:",@no_owner_col";s:1:"G";s:13:",@ts_viewtype";s:1:"F";s:13:",@ts_viewtype";s:1:"E";s:13:",@ts_viewtype";}i:1;a:9:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Date";s:4:"name";s:8:"ts_start";}s:1:"B";a:7:{s:4:"type";s:4:"grid";s:7:"no_lang";s:1:"1";s:4:"data";a:4:{i:0;a:2:{s:2:"h1";s:21:",@pm_integration=full";s:2:"h2";s:22:",!@pm_integration=full";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:12:"All projects";s:4:"name";s:10:"ts_project";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-customfilter";s:4:"size";s:34:"projectmanager-select,All projects";s:4:"name";s:5:"pm_id";s:8:"onchange";i:1;}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:8:"ts_title";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:7:"options";a:2:{i:4;s:1:"1";i:5;s:1:"1";}s:4:"size";s:7:",,,,1,1";}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Duration";s:4:"name";s:11:"ts_duration";}i:2;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:8:"duration";s:4:"size";s:6:",h,,,1";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:11:"ts_quantity";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:8:"quantity";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,3";}}s:1:"F";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Price";s:4:"name";s:12:"ts_unitprice";}s:1:"G";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Total";s:4:"name";s:8:"ts_total";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:5:"price";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,2";}}s:1:"H";a:5:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:8:"ts_owner";s:4:"size";s:4:"User";s:7:"no_lang";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:4:"span";s:8:",noPrint";}}i:2;a:9:{s:1:"A";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[ts_start]";s:8:"readonly";s:1:"1";s:4:"size";s:2:",8";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:4:"link";s:4:"name";s:15:"${row}[ts_link]";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[ts_title]";s:7:"no_lang";s:1:"1";s:4:"span";s:22:",$row_cont[titleClass]";}i:3;a:3:{s:4:"type";s:5:"label";s:4:"name";s:22:"${row}[ts_description]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:10:"select-cat";s:8:"readonly";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:4:"span";s:7:",noWrap";}s:1:"D";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:19:"${row}[ts_duration]";s:8:"readonly";s:1:"1";s:4:"size";s:6:",h,,,1";}s:1:"E";a:5:{s:4:"type";s:5:"float";s:4:"name";s:19:"${row}[ts_quantity]";s:7:"no_lang";s:1:"1";s:4:"size";s:4:",,,3";s:8:"readonly";s:1:"1";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[ts_unitprice]";}s:1:"G";a:5:{s:4:"type";s:5:"float";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[ts_total]";s:4:"size";s:4:",,,2";s:8:"readonly";s:1:"1";}s:1:"H";a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:16:"${row}[ts_owner]";s:8:"readonly";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"View";s:4:"name";s:22:"view[$row_cont[ts_id]]";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.view&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:4:"help";s:15:"View this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:22:"edit[$row_cont[ts_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:186:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.uitimesheet.edit&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:24:"delete[$row_cont[ts_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:9;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1164279120',);
$templ_data[] = array('name' => 'timesheet.index.rows','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:8:{s:2:"c1";s:2:"th";s:2:"c2";s:16:"$row_cont[class]";s:1:"A";s:3:"15%";s:1:"B";s:3:"50%";s:1:"H";s:14:",@no_owner_col";s:1:"G";s:13:",@ts_viewtype";s:1:"F";s:13:",@ts_viewtype";s:1:"E";s:13:",@ts_viewtype";}i:1;a:9:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Date";s:4:"name";s:8:"ts_start";}s:1:"B";a:7:{s:4:"type";s:4:"grid";s:7:"no_lang";s:1:"1";s:4:"data";a:4:{i:0;a:2:{s:2:"h1";s:21:",@pm_integration=full";s:2:"h2";s:22:",!@pm_integration=full";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:12:"All projects";s:4:"name";s:10:"ts_project";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-customfilter";s:4:"size";s:34:"projectmanager-select,All projects";s:4:"name";s:5:"pm_id";s:8:"onchange";i:1;}}i:3;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:8:"ts_title";}}}s:4:"rows";i:3;s:4:"cols";i:1;s:7:"options";a:2:{i:4;s:1:"1";i:5;s:1:"1";}s:4:"size";s:7:",,,,1,1";}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Duration";s:4:"name";s:11:"ts_duration";}i:2;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:8:"duration";s:4:"size";s:6:",h,,,1";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:11:"ts_quantity";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:8:"quantity";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,3";}}s:1:"F";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Price";s:4:"name";s:12:"ts_unitprice";}s:1:"G";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Total";s:4:"name";s:8:"ts_total";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:5:"price";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,2";}}s:1:"H";a:5:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:8:"ts_owner";s:4:"size";s:4:"User";s:7:"no_lang";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:3:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";s:4:"span";s:8:",noPrint";}}i:2;a:9:{s:1:"A";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[ts_start]";s:8:"readonly";s:1:"1";s:4:"size";s:2:",8";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:3:{s:4:"type";s:4:"link";s:4:"name";s:15:"${row}[ts_link]";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[ts_title]";s:7:"no_lang";s:1:"1";s:4:"span";s:22:",$row_cont[titleClass]";}i:3;a:3:{s:4:"type";s:5:"label";s:4:"name";s:22:"${row}[ts_description]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:10:"select-cat";s:8:"readonly";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:4:"span";s:7:",noWrap";}s:1:"D";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:19:"${row}[ts_duration]";s:8:"readonly";s:1:"1";s:4:"size";s:6:",h,,,1";}s:1:"E";a:5:{s:4:"type";s:5:"float";s:4:"name";s:19:"${row}[ts_quantity]";s:7:"no_lang";s:1:"1";s:4:"size";s:4:",,,3";s:8:"readonly";s:1:"1";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[ts_unitprice]";}s:1:"G";a:5:{s:4:"type";s:5:"float";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[ts_total]";s:4:"size";s:4:",,,2";s:8:"readonly";s:1:"1";}s:1:"H";a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:16:"${row}[ts_owner]";s:8:"readonly";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"View";s:4:"name";s:22:"view[$row_cont[ts_id]]";s:7:"onclick";s:187:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.view&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:4:"help";s:15:"View this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:22:"edit[$row_cont[ts_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:187:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.edit&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}i:3;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:24:"delete[$row_cont[ts_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";}s:4:"span";s:8:",noPrint";}}}s:4:"rows";i:2;s:4:"cols";i:9;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1164279120',);

View File

@ -8,7 +8,7 @@
* @subpackage setup * @subpackage setup
* @copyright (c) 2005/6 by Ralf Becker <RalfBecker-AT-outdoor-training.de> * @copyright (c) 2005/6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
if (!defined('TIMESHEET_APP')) if (!defined('TIMESHEET_APP'))
@ -17,40 +17,39 @@ if (!defined('TIMESHEET_APP'))
} }
$setup_info[TIMESHEET_APP]['name'] = TIMESHEET_APP; $setup_info[TIMESHEET_APP]['name'] = TIMESHEET_APP;
$setup_info[TIMESHEET_APP]['version'] = '1.4'; $setup_info[TIMESHEET_APP]['version'] = '1.6';
$setup_info[TIMESHEET_APP]['app_order'] = 5; $setup_info[TIMESHEET_APP]['app_order'] = 5;
$setup_info[TIMESHEET_APP]['tables'] = array('egw_timesheet', 'egw_timesheet_extra'); $setup_info[TIMESHEET_APP]['tables'] = array('egw_timesheet', 'egw_timesheet_extra');
$setup_info[TIMESHEET_APP]['enable'] = 1; $setup_info[TIMESHEET_APP]['enable'] = 1;
$setup_info[TIMESHEET_APP]['author'] = $setup_info[TIMESHEET_APP]['author'] =
$setup_info[TIMESHEET_APP]['maintainer'] = array( $setup_info[TIMESHEET_APP]['maintainer'] = array(
'name' => 'Ralf Becker', 'name' => 'Ralf Becker',
'email' => 'RalfBecker@outdoor-training.de' 'email' => 'RalfBecker@outdoor-training.de'
); );
$setup_info[TIMESHEET_APP]['license'] = 'GPL'; $setup_info[TIMESHEET_APP]['license'] = 'GPL';
$setup_info[TIMESHEET_APP]['description'] = $setup_info[TIMESHEET_APP]['description'] =
'Tracking times and other activities for the Projectmanager.'; 'Tracking times and other activities for the Projectmanager.';
$setup_info[TIMESHEET_APP]['note'] = $setup_info[TIMESHEET_APP]['note'] =
'The TimeSheet application is sponsored by:<ul> 'The TimeSheet application is sponsored by:<ul>
<li> <a href="http://www.stylite.de" target="_blank">Stylite GmbH</a></li> <li> <a href="http://www.stylite.de" target="_blank">Stylite GmbH</a></li>
<li> <a href="http://www.outdoor-training.de" target="_blank">Outdoor Unlimited Training GmbH</a></li> <li> <a href="http://www.outdoor-training.de" target="_blank">Outdoor Unlimited Training GmbH</a></li>
</ul>'; </ul>';
/* The hooks this app includes, needed for hooks registration */ /* The hooks this app includes, needed for hooks registration */
$setup_info[TIMESHEET_APP]['hooks']['preferences'] = TIMESHEET_APP.'.ts_admin_prefs_sidebox_hooks.all_hooks'; $setup_info[TIMESHEET_APP]['hooks']['preferences'] = 'timesheet_hooks::all_hooks';
$setup_info[TIMESHEET_APP]['hooks']['settings'] = TIMESHEET_APP.'.ts_admin_prefs_sidebox_hooks.settings'; $setup_info[TIMESHEET_APP]['hooks']['settings'] = 'timesheet_hooks::settings';
$setup_info[TIMESHEET_APP]['hooks']['admin'] = TIMESHEET_APP.'.ts_admin_prefs_sidebox_hooks.all_hooks'; $setup_info[TIMESHEET_APP]['hooks']['admin'] = 'timesheet_hooks::all_hooks';
$setup_info[TIMESHEET_APP]['hooks']['sidebox_menu'] = TIMESHEET_APP.'.ts_admin_prefs_sidebox_hooks.all_hooks'; $setup_info[TIMESHEET_APP]['hooks']['sidebox_menu'] = 'timesheet_hooks::all_hooks';
$setup_info[TIMESHEET_APP]['hooks']['search_link'] = TIMESHEET_APP.'.botimesheet.search_link'; $setup_info[TIMESHEET_APP]['hooks']['search_link'] = 'timesheet_hooks::search_link';
$setup_info[TIMESHEET_APP]['hooks']['pm_cumulate'] = TIMESHEET_APP.'.botimesheet.cumulate'; $setup_info[TIMESHEET_APP]['hooks']['pm_cumulate'] = 'timesheet_hooks:cumulate';
/* Dependencies for this app to work */ /* Dependencies for this app to work */
$setup_info[TIMESHEET_APP]['depends'][] = array( $setup_info[TIMESHEET_APP]['depends'][] = array(
'appname' => 'phpgwapi', 'appname' => 'phpgwapi',
'versions' => Array('1.3','1.4','1.5') 'versions' => Array('1.5','1.6','1.7')
); );
$setup_info[TIMESHEET_APP]['depends'][] = array( $setup_info[TIMESHEET_APP]['depends'][] = array(
'appname' => 'etemplate', 'appname' => 'etemplate',
'versions' => Array('1.3','1.4','1.5') 'versions' => Array('1.5','1.6','1.7')
); );

View File

@ -6,43 +6,48 @@
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package timesheet * @package timesheet
* @subpackage setup * @subpackage setup
* @copyright (c) 2005 by Ralf Becker <RalfBecker-AT-outdoor-training.de> * @copyright (c) 2005-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
$test[] = '0.1.001'; function timesheet_upgrade0_1_001()
function timesheet_upgrade0_1_001() {
{ $GLOBALS['egw_setup']->oProc->AddColumn('egw_timesheet','pl_id',array(
$GLOBALS['egw_setup']->oProc->AddColumn('egw_timesheet','pl_id',array( 'type' => 'int',
'type' => 'int', 'precision' => '4',
'precision' => '4', 'default' => '0'
'default' => '0' ));
));
return $GLOBALS['setup_info']['timesheet']['currentver'] = '0.2.001'; return $GLOBALS['setup_info']['timesheet']['currentver'] = '0.2.001';
} }
$test[] = '0.2.001';
function timesheet_upgrade0_2_001()
{
$GLOBALS['egw_setup']->oProc->CreateTable('egw_timesheet_extra',array(
'fd' => array(
'ts_id' => array('type' => 'int','precision' => '4','nullable' => False),
'ts_extra_name' => array('type' => 'varchar','precision' => '32','nullable' => False),
'ts_extra_value' => array('type' => 'varchar','precision' => '255','nullable' => False,'default' => '')
),
'pk' => array('ts_id','ts_extra_name'),
'fk' => array(),
'ix' => array(),
'uc' => array()
));
return $GLOBALS['setup_info']['timesheet']['currentver'] = '0.2.002'; function timesheet_upgrade0_2_001()
} {
$GLOBALS['egw_setup']->oProc->CreateTable('egw_timesheet_extra',array(
'fd' => array(
'ts_id' => array('type' => 'int','precision' => '4','nullable' => False),
'ts_extra_name' => array('type' => 'varchar','precision' => '32','nullable' => False),
'ts_extra_value' => array('type' => 'varchar','precision' => '255','nullable' => False,'default' => '')
),
'pk' => array('ts_id','ts_extra_name'),
'fk' => array(),
'ix' => array(),
'uc' => array()
));
$test[] = '0.2.002'; return $GLOBALS['setup_info']['timesheet']['currentver'] = '0.2.002';
function timesheet_upgrade0_2_002() }
{
return $GLOBALS['setup_info']['timesheet']['currentver'] = '1.4';
} function timesheet_upgrade0_2_002()
{
return $GLOBALS['setup_info']['timesheet']['currentver'] = '1.4';
}
function timesheet_upgrade1_4()
{
return $GLOBALS['setup_info']['timesheet']['currentver'] = '1.6';
}

View File

@ -13,9 +13,9 @@
</styles> </styles>
</template> </template>
<template id="timesheet.index.add" template="" lang="" group="0" version="1.3.001"> <template id="timesheet.index.add" template="" lang="" group="0" version="1.3.001">
<button label="Add" id="add" onclick="window.open(egw::link('/index.php','menuaction=timesheet.uitimesheet.edit'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;"/> <button label="Add" id="add" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;"/>
</template> </template>
<template id="timesheet.index.rows" template="" lang="" group="0" version="1.3.002"> <template id="timesheet.index.rows" template="" lang="" group="0" version="1.5.001">
<grid width="100%"> <grid width="100%">
<columns> <columns>
<column width="15%"/> <column width="15%"/>
@ -82,15 +82,15 @@
<menupopup type="select-account" id="${row}[ts_owner]" readonly="true"/> <menupopup type="select-account" id="${row}[ts_owner]" readonly="true"/>
</menulist> </menulist>
<hbox class="noPrint"> <hbox class="noPrint">
<button image="view" label="View" id="view[$row_cont[ts_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.uitimesheet.view&amp;ts_id=$row_cont[ts_id]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" statustext="View this entry"/> <button image="view" label="View" id="view[$row_cont[ts_id]]" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.view&amp;ts_id=$row_cont[ts_id]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;" statustext="View this entry"/>
<button image="edit" label="Edit" id="edit[$row_cont[ts_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=timesheet.uitimesheet.edit&amp;ts_id=$row_cont[ts_id]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;"/> <button image="edit" label="Edit" id="edit[$row_cont[ts_id]]" statustext="Edit this entry" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit&amp;ts_id=$row_cont[ts_id]'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;"/>
<button image="delete" label="Delete" id="delete[$row_cont[ts_id]]" statustext="Delete this entry" onclick="return confirm('Delete this entry');"/> <button image="delete" label="Delete" id="delete[$row_cont[ts_id]]" statustext="Delete this entry" onclick="return confirm('Delete this entry');"/>
</hbox> </hbox>
</row> </row>
</rows> </rows>
</grid> </grid>
</template> </template>
<template id="timesheet.index" template="" lang="" group="0" version="1.5.001"> <template id="timesheet.index" template="" lang="" group="0" version="1.5.002">
<grid width="100%"> <grid width="100%">
<columns> <columns>
<column/> <column/>
@ -109,7 +109,7 @@
<nextmatch id="nm" options="timesheet.index.rows"/> <nextmatch id="nm" options="timesheet.index.rows"/>
</row> </row>
<row class="noPrint"> <row class="noPrint">
<button label="Add" id="add" onclick="window.open(egw::link('/index.php','menuaction=timesheet.uitimesheet.edit'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;"/> <button label="Add" id="add" onclick="window.open(egw::link('/index.php','menuaction=timesheet.timesheet_ui.edit'),'_blank','dependent=yes,width=600,height=400,scrollbars=yes,status=yes'); return false;"/>
</row> </row>
<row disabled="1"> <row disabled="1">
<button label="Export" onclick="timesheet_export(); return false;" id="export"/> <button label="Export" onclick="timesheet_export(); return false;" id="export"/>