Skip to content

Commit

Permalink
🔨#126 Adianti 7.6.0 - update app/lib/menu
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Jan 23, 2024
1 parent 547ee1d commit 3337419
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions app/lib/menu/AdiantiMenuBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,32 @@ public static function parse($file, $theme)

switch ($theme)
{
case 'theme_formdin':
ob_start();
$xml = new SimpleXMLElement(file_get_contents($file));
$menu = new TMenu($xml,null, 1,'dropdown-menu','nav-item dropdown','nav-link dropdown-toggle');
$menu->id = 'main-menu-top';
$menu->show();
$menu_string = ob_get_clean();

$menu_string = str_replace('class="dropdown-menu level-1" id="main-menu-top"', 'class="nav navbar-nav" id="main-menu-top"', $menu_string);
//$menu_string = str_replace('<a href="', '<a class="dropdown-item" href="', $menu_string);
return $menu_string;
break;
case 'theme3':
case 'theme3_v3':
case 'theme3_v4':
case 'theme3_v5':
ob_start();
case 'theme_formdinv':
ob_start();
$xml = new SimpleXMLElement(file_get_contents($file));
$menu = new TMenu($xml, null, 1, 'treeview-menu', 'treeview', '');
$menu->class = 'sidebar-menu';
$menu->id = 'side-menu';
$menu->show();
$menu_string = ob_get_clean();
return $menu_string;
break;
break;
default:
ob_start();
$xml = new SimpleXMLElement(file_get_contents($file));
Expand All @@ -36,11 +51,11 @@ public static function parse($file, $theme)
$menu->add($li);

$menu->class = 'list';
$menu->style = 'overflow: hidden; width: auto; height: 390px;';
$menu->style = 'overflow: hidden; width: auto;';
$menu->show();
$menu_string = ob_get_clean();
return $menu_string;
break;
break;
}
}
}

0 comments on commit 3337419

Please sign in to comment.