mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Properly scope archived based on settings
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
0b30ad0da2
commit
941582ac2a
|
@ -288,7 +288,7 @@ class AssetModelsController extends Controller
|
||||||
public function show($modelId = null)
|
public function show($modelId = null)
|
||||||
{
|
{
|
||||||
$this->authorize('view', AssetModel::class);
|
$this->authorize('view', AssetModel::class);
|
||||||
$model = AssetModel::withTrashed()->withCount('assets')->find($modelId);
|
$model = AssetModel::withTrashed()->find($modelId);
|
||||||
|
|
||||||
if (isset($model->id)) {
|
if (isset($model->id)) {
|
||||||
return view('models/view', compact('model'));
|
return view('models/view', compact('model'));
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="hidden-xs hidden-sm">
|
<span class="hidden-xs hidden-sm">
|
||||||
{{ trans('general.assets') }}
|
{{ trans('general.assets') }}
|
||||||
{!! ($model->assets_count > 0 ) ? '<badge class="badge badge-secondary">'.number_format($model->assets_count).'</badge>' : '' !!}
|
{!! ($model->assets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($model->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
Loading…
Reference in a new issue