Implement new user preference in order to be able to select a handler for opening a merge print document

This commit is contained in:
Hadi Nategh 2018-02-07 13:15:29 +01:00
parent 9c4b26f4fb
commit 034b17a49a
2 changed files with 12 additions and 3 deletions

View File

@ -1875,7 +1875,8 @@ abstract class Merge
try {
if (class_exists('EGroupware\\collabora\\Bo') &&
$GLOBALS['egw_info']['user']['apps']['collabora'] &&
$discovery = \EGroupware\collabora\Bo::discover()
($discovery = \EGroupware\collabora\Bo::discover()) &&
$GLOBALS['egw_info']['user']['preferences']['filemanager']['merge_open_handler'] != 'download'
)
{
$editable_mimes = $discovery;

View File

@ -255,12 +255,20 @@ class filemanager_hooks
),
'collab_excluded_mimes' => array(
'type' => 'taglist',
'label' => 'Excludes selected mime types',
'help' => 'Excludes selected mime types from being opened by editor',
'label' => lang('Excludes selected mime types'),
'help' => lang('Excludes selected mime types from being opened by editor'),
'name' => 'collab_excluded_mimes',
'values' => array_combine(array_keys($editorLink['mime']), array_keys($editorLink['mime'])),
'default' => '',
),
'merge_open_handler' => array(
'type' => 'select',
'label' => lang('Merge print open handler'),
'help' => lang('Defines how to open a merge print documents'),
'name' => 'merge_open_handler',
'values' => array ('download' => lang('download'), 'collabora' => 'Collabora'),
'default' => 'collabora',
)
);
return $settings;