From 2618570931effe052833b7af4fae0761c8426274 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Mon, 17 Aug 2009 18:33:50 +0000 Subject: [PATCH] added a predifined status for a new Timesheet --- timesheet/inc/class.timesheet_hooks.inc.php | 14 +++++++++++++- timesheet/inc/class.timesheet_ui.inc.php | 1 + timesheet/setup/egw_de.lang | 2 ++ timesheet/setup/egw_en.lang | 2 ++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/timesheet/inc/class.timesheet_hooks.inc.php b/timesheet/inc/class.timesheet_hooks.inc.php index 867352e1bb..b990316765 100644 --- a/timesheet/inc/class.timesheet_hooks.inc.php +++ b/timesheet/inc/class.timesheet_hooks.inc.php @@ -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 ;-) } diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php index 1b92cde03f..c8af4d98f5 100644 --- a/timesheet/inc/class.timesheet_ui.inc.php +++ b/timesheet/inc/class.timesheet_ui.inc.php @@ -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) diff --git a/timesheet/setup/egw_de.lang b/timesheet/setup/egw_de.lang index d388bb5c9d..8f1ce5fda3 100644 --- a/timesheet/setup/egw_de.lang +++ b/timesheet/setup/egw_de.lang @@ -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. diff --git a/timesheet/setup/egw_en.lang b/timesheet/setup/egw_en.lang index e3cbbfab2a..605f317f79 100644 --- a/timesheet/setup/egw_en.lang +++ b/timesheet/setup/egw_en.lang @@ -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