From: hickert Date: Fri, 26 Feb 2010 15:20:20 +0000 (+0000) Subject: Updated Menu generation X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ea3e7f7b521ddbaa2b47ba9e8e2f7a0246acb0ae;p=gosa.git Updated Menu generation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15761 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index f66b548e7..56ca32356 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -300,6 +300,7 @@ if($reload_navigation){ $plist->menu=""; } $smarty->assign ("menu", $plist->gen_menu()); +$smarty->assign ("pathMenu", $plist->genPathMenu()); $smarty->assign ("plug", "$plug"); $smarty->assign("iePngWorkaround", $config->get_cfg_value("iePngWorkaround","false" ) == "true"); diff --git a/gosa-core/ihtml/themes/modern/framework.tpl b/gosa-core/ihtml/themes/modern/framework.tpl index e098fb785..78ed0e1fc 100644 --- a/gosa-core/ihtml/themes/modern/framework.tpl +++ b/gosa-core/ihtml/themes/modern/framework.tpl @@ -26,21 +26,12 @@
{$menu} + {$msg_dialogs}
-
-
    -
  • - -
  • -
  • Welcome to GOsa
  • -
  • Help
  • -
  • Change password
  • -
  • My account
  • -
-
+ {$pathMenu} {$contents}
diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index 433bb753c..e4602283a 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -281,27 +281,35 @@ class pluglist { } - function genPathNavigator() + function genPathMenu() { - $cfg= &$this->config->data['PATHMENU']; + if(1 | empty($this->pathMenu)){ + + $this->pathMenu = + "\n
". + "\n
    ". + "\n
  • ". + "\n ". + "\n
  • ". + "\n
  • Welcome to GOsa
  • "; + + $cfg= &$this->config->data['PATHMENU']; + $rcfg = array_reverse($cfg); + foreach($rcfg as $id => $plug){ + + // Do not add inaccessible plugins + if (!$this->check_access($plug['ACL'])){ + unset($rcfg[$id]); + continue; + } - foreach($cfg as $plug){ - list($index, $title, $desc, $icon) = $this->getPlugData($plug['CLASS']); + list($index, $title, $desc, $icon) = $this->getPlugData($plug['CLASS']); + $this->pathMenu.= "\n
  • {$title}
  • "; + } + $this->pathMenu.= "\n
"; + $this->pathMenu.= "\n
"; } - - return("
-
    -
  • - -
  • -
  • Welcome to GOsa
  • -
  • Help
  • -
  • Change password
  • -
  • My account
  • -
-
-"); - + return($this->pathMenu); }