mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-19 04:46:42 +02:00
Implement merge for timesheet
This commit is contained in:
@@ -109,9 +109,6 @@ class timesheet_hooks
|
||||
'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')
|
||||
);
|
||||
// until we have more then one preference
|
||||
if (is_null(self::$timesheet_bo)) self::$timesheet_bo = new timesheet_bo();
|
||||
if (!self::$timesheet_bo->status_labels) unset($file['Preferences']);
|
||||
|
||||
if ($location == 'preferences')
|
||||
{
|
||||
@@ -150,10 +147,11 @@ class timesheet_hooks
|
||||
*/
|
||||
static function settings()
|
||||
{
|
||||
$settings = array();
|
||||
if (is_null(self::$timesheet_bo)) self::$timesheet_bo = new timesheet_bo();
|
||||
|
||||
return array(
|
||||
'predefined_status' => array(
|
||||
if (self::$timesheet_bo->status_labels)
|
||||
{
|
||||
$settings['predefined_status'] = array(
|
||||
'type' => 'select',
|
||||
'label' => 'Status of created timesheets',
|
||||
'name' => 'predefined_status',
|
||||
@@ -161,7 +159,40 @@ class timesheet_hooks
|
||||
'help' => 'Select the predefined status, when creating a new timesheet ',
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
// Merge print
|
||||
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
||||
{
|
||||
$link = egw::link('/index.php','menuaction=timesheet.timesheet_merge.show_replacements');
|
||||
|
||||
$settings['default_document'] = array(
|
||||
'type' => 'input',
|
||||
'size' => 60,
|
||||
'label' => 'Default document to insert entries',
|
||||
'name' => 'default_document',
|
||||
'help' => lang('If you specify a document (full vfs path) here, infolog displays an extra document icon for each entry. That icon allows to download the specified document with the contact data inserted.').' '.
|
||||
lang('The document can contain placeholder like $$subject$$, to be replaced with the contact data (%1full list of placeholder names%2).','<a href="'.$link.'" target="_blank">','</a>').' '.
|
||||
lang('At the moment the following document-types are supported:').'*.rtf, *.txt',
|
||||
'run_lang' => false,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
$settings['document_dir'] = array(
|
||||
'type' => 'input',
|
||||
'size' => 60,
|
||||
'label' => 'Directory with documents to insert entries',
|
||||
'name' => 'document_dir',
|
||||
'help' => lang('If you specify a directory (full vfs path) here, eGroupWare displays an action for each document. That action allows to download the specified document with the %1 data inserted.', lang('timesheet')).' '.
|
||||
lang('The document can contain placeholder like $$info_subject$$, to be replaced with the contact data (%1full list of placeholder names%2).','<a href="'.$link.'" target="_blank">','</a>').' '.
|
||||
lang('At the moment the following document-types are supported:').'*.rtf, *.txt',
|
||||
'run_lang' => false,
|
||||
'xmlrpc' => True,
|
||||
'admin' => False,
|
||||
);
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user