Skip to content

Commit c459fc3

Browse files
author
igor-chepurnoi
committed
update side nav menu in the admin layout
1 parent 4a55308 commit c459fc3

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"yii2mod/yii2-settings": "*",
3030
"yii2mod/yii2-scheduling": "*",
3131
"yii2mod/yii2-bootstrap-notify": "*",
32-
"kartik-v/yii2-widget-sidenav": "*",
3332
"yii2tech/sitemap": "^1.0",
3433
"yii2tech/admin": "*",
3534
"cyberz/yii2-multipath-migrations": "*"

modules/admin/views/layouts/column2.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

33
use app\assets\AdminAsset;
4-
use kartik\sidenav\SideNav;
54
use yii\bootstrap\Nav;
65
use yii\bootstrap\NavBar;
76
use yii\helpers\Html;
87
use yii\widgets\Breadcrumbs;
8+
use yii\widgets\Menu;
99
use yii2mod\notify\BootstrapNotify;
1010

1111
/* @var $this \yii\web\View */
@@ -92,10 +92,14 @@
9292
<div class="row">
9393
<?php if (isset($this->params['sidebar'])): ?>
9494
<div class="col-lg-2">
95-
<?php echo SideNav::widget(['items' => $this->params['sidebar'],
96-
'headingOptions' => ['class' => 'head-style'],
97-
'encodeLabels' => false
98-
]); ?>
95+
<?php echo Menu::widget([
96+
'items' => $this->params['sidebar'],
97+
'encodeLabels' => false,
98+
'options' => [
99+
'class' => 'nav nav-pills nav-stacked admin-side-nav'
100+
]
101+
]);
102+
?>
99103
</div>
100104
<?php endif; ?>
101105
<div class="col-lg-10">

web/css/admin.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,22 @@ a.desc:after {
8989
padding: 10px 20px;
9090
margin: 0 0 15px 0;
9191
}
92+
9293
.navbar {
9394
border-radius: 0 !important;
95+
}
96+
97+
.admin-side-nav {
98+
background-color: rgba(0, 0, 0, 0);
99+
border: 1px solid rgba(216, 207, 207, 0.9);
100+
border-radius: 4px;
101+
}
102+
103+
.admin-side-nav > li > a {
104+
border-radius: 0;
105+
}
106+
107+
.admin-side-nav li a {
108+
border-radius: 0;
109+
border-bottom: 1px solid #ddd;
94110
}

0 commit comments

Comments
 (0)