some fix
This commit is contained in:
28
kernel/views/widgets/admin/menu.php
Normal file
28
kernel/views/widgets/admin/menu.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* @var array $menu
|
||||
*/
|
||||
?>
|
||||
<ul class="list-unstyled components mb-5">
|
||||
<?php foreach ($menu as $item):
|
||||
$child = \kernel\modules\menu\service\MenuService::getChild($item->id);
|
||||
if ($child): ?>
|
||||
<li>
|
||||
<a href="#item<?=$item->id?>" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle"><?= $item->label ?></a>
|
||||
<ul class="collapse list-unstyled <?= \kernel\modules\menu\service\MenuService::hasActiveChild($item->id) ? "show" : "" ?>" id="item<?=$item->id?>">
|
||||
<?php foreach ($child as $subitem): ?>
|
||||
<li class="<?= \kernel\modules\menu\service\MenuService::isActive($subitem->url) ? "active" : "" ?>">
|
||||
<a href="<?= $subitem->url ?>"><?= $subitem->label ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li class="<?= $item->url === \kernel\Request::getUrlPath() || $item->url . "/module_shop_client" === \kernel\Request::getUrlPath() ? "active" : "" ?>">
|
||||
<a href="<?= $item->url ?>"><?= $item->label ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</ul>
|
Reference in New Issue
Block a user