Add some hints to sharing actions

This commit is contained in:
nathangray 2020-03-31 10:36:50 -06:00
parent d24c6f2b7d
commit 0664df4921
2 changed files with 9 additions and 5 deletions

View File

@ -104,7 +104,7 @@ class Sharing extends \EGroupware\Api\Sharing
$document['allowOnMultiple'] = true; $document['allowOnMultiple'] = true;
$document['onExecute'] = "javaScript:app.$appname.share_merge"; $document['onExecute'] = "javaScript:app.$appname.share_merge";
} }
$documents['enabled'] = !!($GLOBALS['egw_info']['user']['apps']['stylite']) ? $documents['enabled'] = (boolean)$documents['children'] && !!($GLOBALS['egw_info']['user']['apps']['stylite']) ?
"javaScript:app.$appname.is_share_enabled" : false; "javaScript:app.$appname.is_share_enabled" : false;
$actions['share']['children']['shareDocuments'] = $documents; $actions['share']['children']['shareDocuments'] = $documents;
} }

View File

@ -435,7 +435,8 @@ class Sharing
'icon' => 'link', 'icon' => 'link',
'order' => 11, 'order' => 11,
'enabled' => "javaScript:app.$appname.is_share_enabled", 'enabled' => "javaScript:app.$appname.is_share_enabled",
'onExecute' => "javaScript:app.$appname.share_link" 'onExecute' => "javaScript:app.$appname.share_link",
'hint' => lang("Share this %1 via URL", Link::get_registry($appname, 'entry'))
), ),
'shareWritable' => array( 'shareWritable' => array(
'caption' => lang('Writable'), 'caption' => lang('Writable'),
@ -443,14 +444,16 @@ class Sharing
'icon' => 'edit', 'icon' => 'edit',
'allowOnMultiple' => true, 'allowOnMultiple' => true,
'enabled' => "javaScript:app.$appname.is_share_enabled", 'enabled' => "javaScript:app.$appname.is_share_enabled",
'checkbox' => true 'checkbox' => true,
'hint' => lang("Allow editing the %1", Link::get_registry($appname, 'entry'))
), ),
'shareFiles' => array( 'shareFiles' => array(
'caption' => lang('Share files'), 'caption' => lang('Share files'),
'group' => 2, 'group' => 2,
'allowOnMultiple' => true, 'allowOnMultiple' => true,
'enabled' => "javaScript:app.$appname.is_share_enabled", 'enabled' => "javaScript:app.$appname.is_share_enabled",
'checkbox' => true 'checkbox' => true,
'hint' => lang('Include access to any linked files (Links tab)')
), ),
'shareFilemanager' => array( 'shareFilemanager' => array(
'caption' => lang('Filemanager directory'), 'caption' => lang('Filemanager directory'),
@ -458,7 +461,8 @@ class Sharing
'icon' => 'link', 'icon' => 'link',
'order' => 20, 'order' => 20,
'enabled' => "javaScript:app.$appname.is_share_enabled", 'enabled' => "javaScript:app.$appname.is_share_enabled",
'onExecute' => "javaScript:app.$appname.share_link" 'onExecute' => "javaScript:app.$appname.share_link",
'hint' => lang('Share just the associated filemanager directory, not the %1', Link::get_registry($appname, 'entry'))
), ),
), ),
)); ));