display a backend specific tab, if supported by backend, eg. versioning information

This commit is contained in:
Ralf Becker 2010-03-23 20:44:17 +00:00
parent 99a9132cd5
commit 8d033f95f8
2 changed files with 22 additions and 0 deletions

View File

@ -921,6 +921,17 @@ class filemanager_ui
'align' => 'right',
));
}
if (($extra_tab = egw_vfs::getExtraInfo($path)))
{
//_debug_array($extra_tab);
$tabs =& $tpl->get_widget_by_name('tabs=general|perms|eacl|preview|custom');
$tabs['name'] .= '|'.$extra_tab['name'];
$tabs['label'] .= '|'.$extra_tab['label'];
if ($extra_tab['data'] && is_array($extra_tab['data']))
{
$content += $extra_tab['data'];
}
}
$GLOBALS['egw_info']['flags']['java_script'] = "<script>window.focus();</script>\n";
$GLOBALS['egw_info']['flags']['app_header'] = lang('Preferences').' '.$path;

View File

@ -1329,6 +1329,17 @@ class egw_vfs extends vfs_stream_wrapper
return self::$lock_cache[$path] = $result;
}
/**
* Get backend specific information (data and etemplate), to integrate as tab in filemanagers settings dialog
*
* @param string $path
* @return array|boolean array with values for keys 'data','etemplate','name','label','help' or false if not supported by backend
*/
static function getExtraInfo($path)
{
return self::_call_on_backend('extra_info',array($path));
}
/**
* Mapps entries of applications to a path for the locking
*