From: hickert Date: Thu, 11 Mar 2010 12:41:19 +0000 (+0000) Subject: Prepared plugins to be able to write path menu entries X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fe85414a620657b4ab9a554d190526c9677af994;p=gosa.git Prepared plugins to be able to write path menu entries git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16449 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_pathNavigator.inc b/gosa-core/include/class_pathNavigator.inc index b9b37a404..cc280955a 100644 --- a/gosa-core/include/class_pathNavigator.inc +++ b/gosa-core/include/class_pathNavigator.inc @@ -5,16 +5,30 @@ class pathNavigator static function registerPlugin($class) { + $str = ""; + + // Display headline of management plugins if($class instanceOf management && isset($class->plHeadline)){ $str= _($class->plHeadline); - }elseif($class instanceOf plugin && isset($class->plHeadline)){ -# $str = _($class->plHeadline); - }elseif($class instanceOf plugin && !isset($class->plHeadline)){ - $str = "{".get_class($class)."}"; - }elseif($class instanceOf tabs){ + } + + // Shown title of sub dialogs (They have no plHeadline set.) + if($class instanceOf plugin && !isset($class->plHeadline)){ + if(empty($class->pathTitle)){ + $str = "Missing: ".get_class($class); + }else{ + $str = _($class->pathTitle); + } + } + + // In case of tabs add the 'dn' of the entry + if($class instanceOf tabs){ $str = $class->dn; - }elseif(is_string($class)){ + } + + // Simple string given + if(is_string($class)){ $str = $class; } diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index 75da65582..d0c7b8096 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -31,7 +31,11 @@ */ class plugin -{ +{ + /*! \brief The title shown in path menu while this plugin is visible. + */ + var $pathTitle = ""; + /*! \brief Reference to parent object