mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
- Add generation target path preference to all apps
- Use common method to get merge preferences to reduce duplication
This commit is contained in:
parent
40af04e38e
commit
da6a16e62d
@ -291,41 +291,8 @@ class addressbook_hooks
|
|||||||
|
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
||||||
{
|
{
|
||||||
$settings['default_document'] = array(
|
$merge = new Api\Contacts\Merge();
|
||||||
'type' => 'vfs_file',
|
$settings += $merge->merge_preferences();
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Default document to insert contacts',
|
|
||||||
'name' => 'default_document',
|
|
||||||
'help' => lang('If you specify a document (full vfs path) here, %1 displays an extra document icon for each entry. That icon allows to download the specified document with the data inserted.', lang('addressbook')).' '.
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.','n_fn').' '.
|
|
||||||
lang('The following document-types are supported:'). implode(',',Api\Storage\Merge::get_file_extensions()),
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
);
|
|
||||||
$settings['document_dir'] = array(
|
|
||||||
'type' => 'vfs_dirs',
|
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Directory with documents to insert contacts',
|
|
||||||
'name' => 'document_dir',
|
|
||||||
'help' => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the data inserted.', lang('addressbook')) . ' ' .
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.', 'n_fn') . ' ' .
|
|
||||||
lang('The following document-types are supported:') . implode(',', Api\Storage\Merge::get_file_extensions()),
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
'default' => '/templates/addressbook',
|
|
||||||
);
|
|
||||||
$settings[Api\Storage\Merge::PREF_DOCUMENT_FILENAME] = array(
|
|
||||||
'type' => 'taglist',
|
|
||||||
'label' => 'Document download filename',
|
|
||||||
'name' => 'document_download_name',
|
|
||||||
'values' => Api\Storage\Merge::DOCUMENT_FILENAME_OPTIONS,
|
|
||||||
'help' => 'Choose the default filename for downloaded documents.',
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
'default' => 'document',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['felamimail'] || $GLOBALS['egw_info']['user']['apps']['mail'])
|
if ($GLOBALS['egw_info']['user']['apps']['felamimail'] || $GLOBALS['egw_info']['user']['apps']['mail'])
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -660,31 +660,8 @@ class calendar_hooks
|
|||||||
// Merge print
|
// Merge print
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
||||||
{
|
{
|
||||||
$settings['default_document'] = array(
|
$merge = new calendar_merge();
|
||||||
'type' => 'vfs_file',
|
$settings += $merge->merge_preferences();
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Default document to insert entries',
|
|
||||||
'name' => 'default_document',
|
|
||||||
'help' => lang('If you specify a document (full vfs path) here, %1 displays an extra document icon for each entry. That icon allows to download the specified document with the data inserted.',lang('calendar')).' '.
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.','calendar_title').' '.
|
|
||||||
lang('The following document-types are supported:'). implode(',',Api\Storage\Merge::get_file_extensions()),
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
);
|
|
||||||
$settings['document_dir'] = array(
|
|
||||||
'type' => 'vfs_dirs',
|
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Directory with documents to insert entries',
|
|
||||||
'name' => 'document_dir',
|
|
||||||
'help' => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the data inserted.',lang('calendar')).' '.
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.','calendar_title').' '.
|
|
||||||
lang('The following document-types are supported:'). implode(',',Api\Storage\Merge::get_file_extensions()),
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
'default' => '/templates/calendar',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$settings += array(
|
$settings += array(
|
||||||
|
@ -171,49 +171,19 @@ class filemanager_hooks
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
$settings[Api\Storage\Merge::PREF_STORE_LOCATION] = array(
|
$merge = new filemanager_merge();
|
||||||
'type' => 'vfs_dir',
|
$settings += $merge->merge_preferences();
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Directory for storing merged documents',
|
|
||||||
'name' => Api\Storage\Merge::PREF_STORE_LOCATION,
|
|
||||||
'help' => lang('When you merge entries into documents, they will be stored here. If no directory is provided, they will be stored in %1', Vfs::get_home_dir())
|
|
||||||
);
|
|
||||||
$settings['default_document'] = array(
|
|
||||||
'type' => 'vfs_file',
|
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Default document to insert entries',
|
|
||||||
'name' => 'default_document',
|
|
||||||
'help' => lang('If you specify a document (full vfs path) here, %1 displays an extra document icon for each entry. That icon allows to download the specified document with the data inserted.', lang('filemanager')) . ' ' .
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.', 'name') . ' ' .
|
|
||||||
lang('The following document-types are supported:') . implode(',', Api\Storage\Merge::get_file_extensions()),
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
);
|
|
||||||
$settings['document_dir'] = array(
|
|
||||||
'type' => 'vfs_dirs',
|
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Directory with documents to insert entries',
|
|
||||||
'name' => 'document_dir',
|
|
||||||
'help' => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the %1 data inserted.', lang('filemanager')).' '.
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.','name').' '.
|
|
||||||
lang('The following document-types are supported:'). implode(',',Api\Storage\Merge::get_file_extensions()),
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
'default' => '/templates/filemanager',
|
|
||||||
);
|
|
||||||
|
|
||||||
$editorLink = self::getEditorLink();
|
$editorLink = self::getEditorLink();
|
||||||
$mimes = array('0' => lang('None'));
|
$mimes = array('0' => lang('None'));
|
||||||
|
|
||||||
foreach ((array)$editorLink['mime'] as $mime => $value)
|
foreach((array)$editorLink['mime'] as $mime => $value)
|
||||||
{
|
{
|
||||||
$mimes[$mime] = lang('%1 file', strtoupper($value['ext'])).' ('.$mime.')';
|
$mimes[$mime] = lang('%1 file', strtoupper($value['ext'])) . ' (' . $mime . ')';
|
||||||
|
|
||||||
if (!empty($value['extra_extensions']))
|
if(!empty($value['extra_extensions']))
|
||||||
{
|
{
|
||||||
$mimes[$mime] .= ', '.strtoupper(implode(', ', $value['extra_extensions']));
|
$mimes[$mime] .= ', ' . strtoupper(implode(', ', $value['extra_extensions']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,41 +458,8 @@ class infolog_hooks
|
|||||||
// Merge print
|
// Merge print
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
||||||
{
|
{
|
||||||
$settings['default_document'] = array(
|
$merge = new infolog_merge();
|
||||||
'type' => 'vfs_file',
|
$settings += $merge->merge_preferences();
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Default document to insert entries',
|
|
||||||
'name' => 'default_document',
|
|
||||||
'help' => lang('If you specify a document (full vfs path) here, %1 displays an extra document icon for each entry. That icon allows to download the specified document with the data inserted.',lang('infolog')).' '.
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.','info_subject').' '.
|
|
||||||
lang('The following document-types are supported:').'*.rtf, *.txt',
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
);
|
|
||||||
$settings['document_dir'] = array(
|
|
||||||
'type' => 'vfs_dirs',
|
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Directory with documents to insert entries',
|
|
||||||
'name' => 'document_dir',
|
|
||||||
'help' => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the data inserted.', lang('infolog')) . ' ' .
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.', 'info_subject') . ' ' .
|
|
||||||
lang('The following document-types are supported:') . '*.rtf, *.txt',
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
'default' => '/templates/infolog',
|
|
||||||
);
|
|
||||||
$settings[Api\Storage\Merge::PREF_DOCUMENT_FILENAME] = array(
|
|
||||||
'type' => 'taglist',
|
|
||||||
'label' => 'Document download filename',
|
|
||||||
'name' => 'document_download_name',
|
|
||||||
'values' => Api\Storage\Merge::DOCUMENT_FILENAME_OPTIONS,
|
|
||||||
'help' => 'Choose the default filename for downloaded documents.',
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
'default' => 'document',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['calendar'])
|
if ($GLOBALS['egw_info']['user']['apps']['calendar'])
|
||||||
|
@ -178,41 +178,8 @@ class timesheet_hooks
|
|||||||
// Merge print
|
// Merge print
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
||||||
{
|
{
|
||||||
$settings['default_document'] = array(
|
$merge = new timesheet_merge();
|
||||||
'type' => 'vfs_file',
|
$settings += $merge->merge_preferences();
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Default document to insert entries',
|
|
||||||
'name' => 'default_document',
|
|
||||||
'help' => lang('If you specify a document (full vfs path) here, %1 displays an extra document icon for each entry. That icon allows to download the specified document with the data inserted.',lang('timesheet')).' '.
|
|
||||||
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.', 'ts_title').' '.
|
|
||||||
lang('The following document-types are supported:'). implode(',',Api\Storage\Merge::get_file_extensions()),
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
);
|
|
||||||
$settings['document_dir'] = array(
|
|
||||||
'type' => 'vfs_dirs',
|
|
||||||
'size' => 60,
|
|
||||||
'label' => 'Directory with documents to insert entries',
|
|
||||||
'name' => 'document_dir',
|
|
||||||
'help' => lang('If you specify a directory (full vfs path) here, %1 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 {{%1}}, to be replaced with the data.', 'ts_title') . ' ' .
|
|
||||||
lang('The following document-types are supported:') . implode(',', Api\Storage\Merge::get_file_extensions()),
|
|
||||||
'run_lang' => false,
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
'default' => '/templates/timesheet',
|
|
||||||
);
|
|
||||||
$settings[Api\Storage\Merge::PREF_DOCUMENT_FILENAME] = array(
|
|
||||||
'type' => 'taglist',
|
|
||||||
'label' => 'Document download filename',
|
|
||||||
'name' => 'document_download_name',
|
|
||||||
'values' => Api\Storage\Merge::DOCUMENT_FILENAME_OPTIONS,
|
|
||||||
'help' => 'Choose the default filename for downloaded documents.',
|
|
||||||
'xmlrpc' => True,
|
|
||||||
'admin' => False,
|
|
||||||
'default' => 'document',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $settings;
|
return $settings;
|
||||||
|
Loading…
Reference in New Issue
Block a user