diff options
author | Christian Klinger | 2016-06-15 16:43:17 +0200 |
---|---|---|
committer | Christian Klinger | 2016-06-15 16:43:17 +0200 |
commit | 2b18d0d0c49c3a75bd221ab86b7315f7bae98008 (patch) | |
tree | 7d44e103224c1a79e8ccdd5d0313f76180847303 /inc/dashboard.inc.php | |
parent | small style changes (diff) | |
parent | [sysconfignew] Move css from global file to module specific one (diff) | |
download | slx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.tar.gz slx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.tar.xz slx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.zip |
Merge branch 'modularization' of git.openslx.org:openslx-ng/slx-admin into modularization
Conflicts:
install/content.sql
install/schema.sql
Diffstat (limited to 'inc/dashboard.inc.php')
-rw-r--r-- | inc/dashboard.inc.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/inc/dashboard.inc.php b/inc/dashboard.inc.php index ddea6166..3c913b76 100644 --- a/inc/dashboard.inc.php +++ b/inc/dashboard.inc.php @@ -4,6 +4,7 @@ class Dashboard { private static $iconCache = array(); + private static $subMenu = array(); public static function createMenu() { @@ -16,6 +17,7 @@ class Dashboard continue; $modByCategory[$cat][] = $module; } + $currentPage = Page::getModule()->getIdentifier(); $categories = array(); $catSort = array(); foreach ($modByCategory as $catId => $modList) { @@ -23,11 +25,15 @@ class Dashboard $sectionSort = array(); foreach ($modList as $module) { $modId = $module->getIdentifier(); - $modules[] = array( + $newEntry = array( 'displayName' => $module->getDisplayName(), - 'identifier' => $module->getIdentifier(), - 'className' => ($module->getIdentifier() === Page::getModule()->getIdentifier()) ? 'active' : '' + 'identifier' => $module->getIdentifier() ); + if ($module->getIdentifier() === $currentPage) { + $newEntry['className'] = 'active'; + $newEntry['subMenu'] = self::$subMenu; + } + $modules[] = $newEntry; if (isset($MENU_SETTING_SORT_ORDER[$modId])) { $sectionSort[] = (string)($MENU_SETTING_SORT_ORDER[$modId] + 1000); } else { @@ -82,5 +88,10 @@ class Dashboard } return 'glyphicon glyphicon-' . self::$iconCache[$module][$icon]; } + + public static function addSubmenu($url, $name) + { + self::$subMenu[] = array('url' => $url, 'name' => $name); + } }
\ No newline at end of file |