From bb477a6e32047142a526ce6be933d8187ddbe162 Mon Sep 17 00:00:00 2001 From: osmiy Date: Thu, 15 Feb 2007 15:08:54 +0000 Subject: - added highlighting for second level menu (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@3833 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/page_header.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'frontends/php/include/page_header.php') diff --git a/frontends/php/include/page_header.php b/frontends/php/include/page_header.php index ff21e5c5..cb8dad53 100644 --- a/frontends/php/include/page_header.php +++ b/frontends/php/include/page_header.php @@ -252,7 +252,7 @@ COpt::profiling_start("page"); // End of check permissions unset($menu_url); - foreach($sub['pages'] as $sub_pages) + foreach($sub['pages'] as $id => $sub_pages) { if($page['file'] == $sub_pages['url']) @@ -280,6 +280,8 @@ COpt::profiling_start("page"); if(isset($menu_url)) /* active menu */ { + $sub['pages'][$id]['active'] = true; /* mark as active */ + $class = "active"; update_profile('web.menu.'.$label.'.last', $menu_url); @@ -294,8 +296,11 @@ COpt::profiling_start("page"); { if(!isset($sub_pages['label'])) continue; + $label = new CLink($sub_pages['label'], $sub_pages['url'],'highlight'); + if(isset($sub_pages['active'])) $label = new CSpan($label, 'active'); + array_push($sub_menu_row, - new CLink($sub_pages['label'], $sub_pages['url'],'highlight'), + $label, new CSpan(SPACE.SPACE.'|'.SPACE.SPACE, 'divider') ); } -- cgit