Merge pull request #11149 from Godmartinz/gh11129_setting_disclosure_arrow

Fixed #11129 - settings treeview won't stay active.
This commit is contained in:
snipe 2022-05-23 12:55:11 -07:00 committed by GitHub
commit 70344cc02e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View file

@ -1,7 +1,6 @@
<?php
namespace App\Helpers;
use App\Models\Accessory;
use App\Models\Component;
use App\Models\Consumable;
@ -1089,4 +1088,10 @@ class Helper
return $bytes;
}
public static function SettingUrls(){
$settings=['#','fields.index', 'statuslabels.index', 'models.index', 'categories.index', 'manufacturers.index', 'suppliers.index', 'departments.index', 'locations.index', 'companies.index', 'depreciations.index'];
return $settings;
}
}

View file

@ -386,7 +386,7 @@
<!-- Sidebar toggle button-->
</header>
<!-- Left side column. contains the logo and sidebar -->
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
@ -584,8 +584,8 @@
@endcan
@can('backend.interact')
<li class="treeview">
<a href="#">
<li class="treeview {!! in_array(Request::route()->getName(),App\Helpers\Helper::SettingUrls()) ? ' active': '' !!}">
<a href="#" id="settings" class="">
<i class="fas fa-cog" aria-hidden="true"></i>
<span>{{ trans('general.settings') }}</span>
<i class="fa fa-angle-left pull-right"></i>
@ -616,7 +616,6 @@
</li>
@endcan
@can('view', \App\Models\Category::class)
<li>
<a href="{{ route('categories.index') }}" {{ (Request::is('/categories') ? ' class="active"' : '') }}>
@ -672,9 +671,7 @@
</a>
</li>
@endcan
</ul>
</li>
@endcan