mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-27 06:29:19 +08:00
Fix generating sidebar
This commit is contained in:
parent
98e27151ff
commit
9bf7dccb64
@ -166,16 +166,18 @@ if (! function_exists('bs_menu')) {
|
||||
}
|
||||
|
||||
$classes = [];
|
||||
$active ? ($classes[] = 'active') : null;
|
||||
$active ? ($classes[] = 'active menu-open') : null;
|
||||
isset($value['children']) ? ($classes[] = 'treeview') : null;
|
||||
|
||||
$content .= sprintf('<li class="%s">', implode(' ', $classes));
|
||||
$attr = count($classes) ? sprintf(' class="%s"', implode(' ', $classes)) : '';
|
||||
|
||||
$content .= "<li{$attr}>";
|
||||
|
||||
if (isset($value['children'])) {
|
||||
$content .= sprintf('<a href="#"><i class="fa %s"></i> <span>%s</span><span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span></a>', $value['icon'], trans($value['title']));
|
||||
|
||||
// recurse
|
||||
$content .= '<ul class="treeview-menu" style="display: none;">'.bs_menu_render($value['children']).'</ul>';
|
||||
$content .= '<ul class="treeview-menu">'.bs_menu_render($value['children']).'</ul>';
|
||||
} else {
|
||||
$content .= sprintf('<a href="%s"><i class="fa %s"></i> <span>%s</span></a>', url($value['link']), $value['icon'], trans($value['title']));
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ $.defaultPaginatorConfig = {
|
||||
};
|
||||
|
||||
$(document).ready(() => {
|
||||
$('li.active > ul').show();
|
||||
|
||||
$('input').iCheck({
|
||||
radioClass: 'iradio_square-blue',
|
||||
checkboxClass: 'icheckbox_square-blue'
|
||||
|
@ -63,7 +63,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<ul class="sidebar-menu">
|
||||
<ul class="sidebar-menu tree" data-widget="tree">
|
||||
<li class="header">{{ trans('general.admin-panel') }}</li>
|
||||
{!! bs_menu('admin') !!}
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Sidebar Menu -->
|
||||
<ul class="sidebar-menu" data-widget="tree">
|
||||
<ul class="sidebar-menu tree" data-widget="tree">
|
||||
<li class="header">{{ trans('general.user-center') }}</li>
|
||||
{!! bs_menu('user') !!}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user