re-adds Request::is to setting categories

This commit is contained in:
Godfrey M 2022-05-18 14:31:03 -07:00
parent eaeb74c576
commit 877b1bd0a3

View file

@ -385,7 +385,8 @@
</a> </a>
<!-- Sidebar toggle button--> <!-- Sidebar toggle button-->
</header> </header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar"> <aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less --> <!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar"> <section class="sidebar">
@ -589,81 +590,79 @@
<span>{{ trans('general.settings') }}</span> <span>{{ trans('general.settings') }}</span>
<i class="fa fa-angle-left pull-right"></i> <i class="fa fa-angle-left pull-right"></i>
</a> </a>
<ul class="treeview-menu"> <ul class="treeview-menu">
@if(Gate::allows('view', App\Models\CustomField::class) || Gate::allows('view', App\Models\CustomFieldset::class)) @if(Gate::allows('view', App\Models\CustomField::class) || Gate::allows('view', App\Models\CustomFieldset::class))
<li> <li>
<a href="{{ route('fields.index') }}"> <a href="{{ route('fields.index') }}" class="{!! Request::is(route('fields.index') ? ' class="active"' : '') !!}">
{{ trans('admin/custom_fields/general.custom_fields') }} {{ trans('admin/custom_fields/general.custom_fields') }}
</a> </a>
</li> </li>
@endif @endif
@can('view', \App\Models\Statuslabel::class) @can('view', \App\Models\Statuslabel::class)
<li > <li {!! (Request::is('statuslabels*') ? ' class="active"' : '') !!}>
<a href="{{ route('statuslabels.index') }}"> <a href="{{ route('statuslabels.index') }}">
{{ trans('general.status_labels') }} {{ trans('general.status_labels') }}
</a> </a>
</li> </li>
@endcan @endcan
@can('view', \App\Models\AssetModel::class) @can('view', \App\Models\AssetModel::class)
<li> <li>
<a href="{{ route('models.index') }}"> <a href="{{ route('models.index') }}" {{ (Request::is('/assetmodels') ? ' class="active"' : '') }}>
{{ trans('general.asset_models') }} {{ trans('general.asset_models') }}
</a> </a>
</li> </li>
@endcan @endcan
@can('view', \App\Models\Category::class) @can('view', \App\Models\Category::class)
<li> <li>
<a href="{{ route('categories.index') }}"> <a href="{{ route('categories.index') }}" {{ (Request::is('/categories') ? ' class="active"' : '') }}>
{{ trans('general.categories') }} {{ trans('general.categories') }}
</a> </a>
</li> </li>
@endcan @endcan
@can('view', \App\Models\Manufacturer::class) @can('view', \App\Models\Manufacturer::class)
<li> <li>
<a href="{{ route('manufacturers.index') }}"> <a href="{{ route('manufacturers.index') }}" {{ (Request::is('/manufacturers') ? ' class="active"' : '') }}>
{{ trans('general.manufacturers') }} {{ trans('general.manufacturers') }}
</a> </a>
</li> </li>
@endcan @endcan
@can('view', \App\Models\Supplier::class) @can('view', \App\Models\Supplier::class)
<li> <li>
<a href="{{ route('suppliers.index') }}"> <a href="{{ route('suppliers.index') }}" {{ (Request::is('/suppliers') ? ' class="active"' : '') }}>
{{ trans('general.suppliers') }} {{ trans('general.suppliers') }}
</a> </a>
</li> </li>
@endcan @endcan
@can('view', \App\Models\Department::class) @can('view', \App\Models\Department::class)
<li> <li>
<a href="{{ route('departments.index') }}"> <a href="{{ route('departments.index') }}" {{ (Request::is('/departments') ? ' class="active"' : '') }}>
{{ trans('general.departments') }} {{ trans('general.departments') }}
</a> </a>
</li> </li>
@endcan @endcan
@can('view', \App\Models\Location::class) @can('view', \App\Models\Location::class)
<li> <li>
<a href="{{ route('locations.index') }}"> <a href="{{ route('locations.index') }}" {{ (Request::is('/locations') ? ' class="active"' : '') }}>
{{ trans('general.locations') }} {{ trans('general.locations') }}
</a> </a>
</li> </li>
@endcan @endcan
@can('view', \App\Models\Company::class) @can('view', \App\Models\Company::class)
<li> <li>
<a href="{{ route('companies.index') }}"> <a href="{{ route('companies.index') }}" {{ (Request::is('/companies') ? ' class="active"' : '') }}>
{{ trans('general.companies') }} {{ trans('general.companies') }}
</a> </a>
</li> </li>
@endcan @endcan
@can('view', \App\Models\Depreciation::class) @can('view', \App\Models\Depreciation::class)
<li> <li>
<a href="{{ route('depreciations.index') }}"> <a href="{{ route('depreciations.index') }}" {{ (Request::is('/depreciations') ? ' class="active"' : '') }}>
{{ trans('general.depreciation') }} {{ trans('general.depreciation') }}
</a> </a>
</li> </li>
@endcan @endcan
</ul> </ul>
</li> </li>
@endcan @endcan