diff --git a/src/Adminlte.php b/src/Adminlte.php index 7765b72..e102086 100644 --- a/src/Adminlte.php +++ b/src/Adminlte.php @@ -6,7 +6,6 @@ /** * Class Adminlte - * * @author Joy Lazari * @package GionniValeriana\laravelAdminlte */ diff --git a/src/AdminlteServiceProvider.php b/src/AdminlteServiceProvider.php index 0e818f5..f3a28e2 100755 --- a/src/AdminlteServiceProvider.php +++ b/src/AdminlteServiceProvider.php @@ -6,7 +6,6 @@ /** * Class AdminlteServiceProvider - * * @author Joy Lazari * @package GionniValeriana\laravelAdminlte */ @@ -14,14 +13,12 @@ class AdminlteServiceProvider extends ServiceProvider { /** * Register the service provider. - * * @return void */ public function register() { $this->app->bindShared('GionniValeriana\laravelAdminlte\Adminlte', function ($app) { return app('\GionniValeriana\laravelAdminlte\Adminlte'); - } - ); + }); $this->app->singleton('adminlte', 'GionniValeriana\laravelAdminlte\Adminlte'); } @@ -29,7 +26,7 @@ public function boot() { $this->loadViewsFrom(__DIR__ . '/views', 'adminlte'); $this->publishes([ - base_path().'/vendor/almasaeed2010/adminlte/' => public_path('packages/GionniValeriana/adminlte/'), + base_path() . '/vendor/almasaeed2010/adminlte/' => public_path('packages/GionniValeriana/adminlte/'), ], 'assets'); } diff --git a/src/MenuItem.php b/src/MenuItem.php index 595bcf6..6a05c85 100644 --- a/src/MenuItem.php +++ b/src/MenuItem.php @@ -7,7 +7,6 @@ /** * Class MenuItem - * * @author Joy Lazari * @package GionniValeriana\laravelAdminlte */ @@ -19,8 +18,8 @@ class MenuItem { protected $menuItem; public function __construct(BaseMenuItem $menuItem) { - $this->menuItem = $menuItem; - $admin = Admin::instance(); + $this->menuItem = $menuItem; + $admin = Admin::instance(); $this->htmlBuilder = $admin->htmlBuilder; } @@ -33,12 +32,10 @@ public function render($level = 1) { $content = $this->htmlBuilder->tag('i', [ 'class' => [ 'fa', - 'fa-fw', $this->menuItem->getIcon() ] - ] - ); - $content .= ' ' . $this->menuItem->getLabel() . $this->htmlBuilder->tag('span', ['class' => 'fa arrow']); + ]); + $content .= ' ' . $this->htmlBuilder->tag('span', [], $this->menuItem->getLabel()) . $this->htmlBuilder->tag('i', ['class' => 'fa fa-angle-left pull-right']); $content = $this->htmlBuilder->tag('a', ['href' => '#'], $content); $subitemsContent = ''; @@ -46,22 +43,24 @@ public function render($level = 1) { $subitemsContent .= $item->render($level); } $content .= $this->htmlBuilder->tag('ul', ['class' => 'treeview-menu'], $subitemsContent); - } else { + + $attr = ['class' => ['treeview']]; + } + else { + $attr = []; $content = $this->renderSingleItem(); } - return $this->htmlBuilder->tag('li', [], $content); + return $this->htmlBuilder->tag('li', $attr, $content); } protected function renderSingleItem() { $content = $this->htmlBuilder->tag('i', [ 'class' => [ 'fa', - 'fa-fw', $this->menuItem->getIcon() ] - ] - ); - $content .= ' ' . $this->menuItem->getLabel(); + ]); + $content .= ' ' . $this->htmlBuilder->tag('span', [], $this->menuItem->getLabel()); return $this->htmlBuilder->tag('a', ['href' => $this->menuItem->getUrl()], $content); } diff --git a/src/views/_layout/base.blade.php b/src/views/_layout/base.blade.php index 8c4b897..cdda29c 100755 --- a/src/views/_layout/base.blade.php +++ b/src/views/_layout/base.blade.php @@ -25,7 +25,7 @@ - + @yield('content') @foreach (\SleepingOwl\Admin\AssetManager\AssetManager::scripts() as $script) diff --git a/src/views/_layout/inner.blade.php b/src/views/_layout/inner.blade.php index e6c4974..2de956a 100644 --- a/src/views/_layout/inner.blade.php +++ b/src/views/_layout/inner.blade.php @@ -3,7 +3,10 @@ @section('content') + + + + + + \ No newline at end of file