added a predifined status for a new Timesheet

This commit is contained in:
Stefan Becker 2009-08-17 18:33:50 +00:00
parent 6b3c7942d6
commit 2618570931
4 changed files with 18 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class timesheet_hooks
if ($GLOBALS['egw_info']['user']['apps']['preferences'] && $location != 'admin')
{
$file = array(
// 'Preferences' => egw::link('/index.php','menuaction=preferences.uisettings.index&appname='.$appname),
'Preferences' => egw::link('/index.php','menuaction=preferences.uisettings.index&appname='.$appname),
'Grant Access' => egw::link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
'Edit Categories' => egw::link('/index.php','menuaction=preferences.uicategories.index&cats_app=' . $appname . '&cats_level=True&global_cats=True')
);
@ -140,6 +140,18 @@ class timesheet_hooks
{
self::check_set_default_prefs();
$timesheet = new timesheet_bo(); //nedd Status from timesheet
$GLOBALS['settings']['predefined_status'] = array(
'type' => 'select',
'label' => 'Status of created timesheets',
'name' => 'predefined_status',
'values' => $timesheet->status_labels,
'help' => 'Select the predefined status, whan creating a new timesheet ',
'xmlrpc' => True,
'admin' => False,
);
return true; // otherwise prefs say it cant find the file ;-)
}

View File

@ -247,6 +247,7 @@ class timesheet_ui extends timesheet_bo
'ts_quantity_blur' => $this->data['ts_duration'] ? round($this->data['ts_duration'] / 60.0,3) : '',
'start_time' => $this->datetime2time($this->data['ts_start']),
'pm_integration' => $this->pm_integration,
'ts_status' => ($preserv['ts_status'] !='')? $preserv['ts_status'] : $GLOBALS['egw_info']['user']['preferences']['timesheet']['predefined_status'],
));
$links = array();
// create links specified in the REQUEST (URL)

View File

@ -72,11 +72,13 @@ select a project timesheet de Projekt auswählen
select a status of the timesheet timesheet de einen status auswählen
select action timesheet de Bitte eine Aktion auswählen
select multiple timeshhets for a further action timesheet de Wählen Sie mehrere Stundenzettel für einen weitere Aktion aus
select the predefined status, whan creating a new timesheet timesheet de Wählen Sie einen Status als Vorgabe für neu zu erstellende Stundenzettel aus
show a quantity sum (eg. to sum up negative overtime) admin de Zeige eine Mengensumme (z.B. um negative Überstunden zu summieren)
start timesheet de Start
starttime timesheet de Startzeit
starttime has to be before endtime !!! timesheet de Startzeit muss vor der Endzeit liegen !!!
status deleted. timesheet de Status gelöscht
status of created timesheets timesheet de Status für neue Stundenzettel
status updated. timesheet de Status geändert
sum %1: timesheet de Summe %1:
the name used internaly (<= 20 chars), changeing it makes existing data unavailible timesheet de Dieser Name wird nur intern benutzt (<= 20 Zeichen), Änderungen führen dazu, das bestehende Daten nicht mehr angezeigt werden können.

View File

@ -72,11 +72,13 @@ select a project timesheet en Select a project
select a status of the timesheet timesheet en select a status of the timesheet
select action timesheet en Select action
select multiple timeshhets for a further action timesheet en Select multiple timeshhets for a further action
select the predefined status, whan creating a new timesheet timesheet en Select the predefined status, whan creating a new timesheet
show a quantity sum (eg. to sum up negative overtime) admin en Show a quantity sum (eg. to sum up negative overtime)
start timesheet en Start
starttime timesheet en Starttime
starttime has to be before endtime !!! timesheet en Starttime has to be before endtime !!!
status deleted. timesheet en Status deleted.
status of created timesheets timesheet en Status of created timesheets
status updated. timesheet en Status updated.
sum %1: timesheet en Sum %1:
the name used internaly (<= 20 chars), changeing it makes existing data unavailible timesheet en the name used internaly (<= 20 chars), changeing it makes existing data unavailible