mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Default timesheet history to on
This commit is contained in:
parent
2d3c11ab3c
commit
e8318b2442
@ -158,7 +158,11 @@ class timesheet_ui extends timesheet_bo
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'undelete':
|
case 'undelete':
|
||||||
if($content['ts_status'] == self::DELETED_STATUS) unset($content['ts_status']);
|
if($content['ts_status'] == self::DELETED_STATUS)
|
||||||
|
{
|
||||||
|
unset($content['ts_status']);
|
||||||
|
$this->data['ts_status'] = '';
|
||||||
|
}
|
||||||
$button = 'apply';
|
$button = 'apply';
|
||||||
// fall through
|
// fall through
|
||||||
case 'save':
|
case 'save':
|
||||||
@ -385,10 +389,6 @@ class timesheet_ui extends timesheet_bo
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
$sel_options['status'] = $this->field2label;
|
$sel_options['status'] = $this->field2label;
|
||||||
if($this->config_data['history'])
|
|
||||||
{
|
|
||||||
$sel_options['status'][self::DELETED_STATUS] = 'Deleted';
|
|
||||||
}
|
|
||||||
|
|
||||||
// the actual title-blur is either the preserved title blur (if we are called from infolog entry),
|
// the actual title-blur is either the preserved title blur (if we are called from infolog entry),
|
||||||
// or the preserved project-blur comming from the current selected project
|
// or the preserved project-blur comming from the current selected project
|
||||||
@ -422,7 +422,7 @@ class timesheet_ui extends timesheet_bo
|
|||||||
}
|
}
|
||||||
$sel_options['ts_owner'] = $edit_grants;
|
$sel_options['ts_owner'] = $edit_grants;
|
||||||
$sel_options['ts_status'] = $this->status_labels;
|
$sel_options['ts_status'] = $this->status_labels;
|
||||||
if($this->config_data['history'])
|
if($this->config_data['history'] && $content['ts_status'] == self::DELETED_STATUS)
|
||||||
{
|
{
|
||||||
$sel_options['ts_status'][self::DELETED_STATUS] = 'Deleted';
|
$sel_options['ts_status'][self::DELETED_STATUS] = 'Deleted';
|
||||||
}
|
}
|
||||||
@ -786,7 +786,8 @@ class timesheet_ui extends timesheet_bo
|
|||||||
if ($query['selectcols'] && strpos($query['selectcols'],'ts_unitprice')===false) $rows['no_ts_unitprice'] = 1;
|
if ($query['selectcols'] && strpos($query['selectcols'],'ts_unitprice')===false) $rows['no_ts_unitprice'] = 1;
|
||||||
if ($query['selectcols'] && strpos($query['selectcols'],'ts_total')===false) $rows['no_ts_total'] = 1;
|
if ($query['selectcols'] && strpos($query['selectcols'],'ts_total')===false) $rows['no_ts_total'] = 1;
|
||||||
}
|
}
|
||||||
$rows['no_ts_status'] = strpos($query['selectcols'], 'ts_status') === false || $query['no_status'];
|
$rows['no_ts_status'] = strpos($query['selectcols'], 'ts_status') === false && !$this->config_data['history'] ||
|
||||||
|
$query['no_status'];
|
||||||
|
|
||||||
return $total;
|
return $total;
|
||||||
}
|
}
|
||||||
|
27
timesheet/setup/default_records.inc.php
Normal file
27
timesheet/setup/default_records.inc.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* TimeSheet - Default records
|
||||||
|
*
|
||||||
|
* @link http://www.egroupware.org
|
||||||
|
* @author Nathan Gray
|
||||||
|
* @package timesheet
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
|
*/
|
||||||
|
|
||||||
|
foreach(array(
|
||||||
|
'history' => 'history',
|
||||||
|
) as $name => $value)
|
||||||
|
{
|
||||||
|
$GLOBALS['egw_setup']->db->insert(
|
||||||
|
$GLOBALS['egw_setup']->config_table,
|
||||||
|
array(
|
||||||
|
'config_app' => 'timesheet',
|
||||||
|
'config_name' => $name,
|
||||||
|
'config_value' => $value,
|
||||||
|
),array(
|
||||||
|
'config_app' => 'timesheet',
|
||||||
|
'config_name' => $name,
|
||||||
|
),__LINE__,__FILE__
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user