2011-07-20 Sergio Martin <sergio.martin@artica.es>

* include/functions_menu.php: Fixed side menu confitions 
	to draw in bold style the selected subsections to allow
	secondary parameters like "&tab=agents" in the subsections



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4605 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2011-07-20 16:23:43 +00:00
parent 068a788ad3
commit 3f3577b787
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2011-07-20 Sergio Martin <sergio.martin@artica.es>
* include/functions_menu.php: Fixed side menu confitions
to draw in bold style the selected subsections to allow
secondary parameters like "&tab=agents" in the subsections
2011-07-20 Sergio Martin <sergio.martin@artica.es>
* godmode/menu.php: Added users massive operation to the

View File

@ -33,6 +33,9 @@ function menu_print_menu (&$menu) {
$sec = (string) get_parameter ('sec');
$sec2 = (string) get_parameter ('sec2');
$allsec2 = explode('sec2=', $_SERVER['REQUEST_URI']);
$allsec2 = $allsec2[1];
echo '<ul'.(isset ($menu['class']) ? ' class="'.$menu['class'].'"' : '').'>';
foreach ($menu as $mainsec => $main) {
@ -81,27 +84,25 @@ function menu_print_menu (&$menu) {
$submenu_output = '';
$selected = false;
$visible = false;
foreach ($main["sub"] as $subsec2 => $sub) {
$subsec2 = io_safe_output($subsec2);
// Choose valid suboptions (sec2)
if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $subsec2)) == false){
continue;
}
//Set class
if (($sec2 == $subsec2 && isset ($sub[$subsec2]["options"]))
if (($sec2 == $subsec2 || $allsec2 == $subsec2) && isset ($sub[$subsec2]["options"])
&& (get_parameter_get ($sub[$subsec2]["options"]["name"]) == $sub[$subsec2]["options"]["value"])) {
//If the subclass is selected and there are options and that options value is true
$class = 'submenu_selected';
$selected = true;
$visible = true;
}
elseif ($sec2 == $subsec2 && !isset ($sub[$subsec2]["options"])) {
elseif (($sec2 == $subsec2 || $allsec2 == $subsec2) && !isset ($sub[$subsec2]["options"])) {
$class = 'submenu_selected';
$selected = true;
$hasExtensions = (array_key_exists('hasExtensions',$main)) ? $main['hasExtensions'] : false;
if (($extensionInMenuParameter != '') && ($hasExtensions))
$visible = true;
@ -112,7 +113,7 @@ function menu_print_menu (&$menu) {
//Else it's not selected
$class = 'submenu_not_selected';
}
if (! isset ($sub["refr"])) {
$sub["refr"] = 0;
}