Fixes #1626 - correctly show deleted models

This commit is contained in:
snipe
2016-01-13 07:34:02 -08:00
parent 348c8f62d1
commit 1908499379
3 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -401,7 +401,13 @@ class ModelsController extends AdminController
public function getDatatable($status = null)
{
$models = Model::with('category','assets','depreciation');
($status != 'Deleted') ?: $models->withTrashed()->Deleted();
switch ($status) {
case 'Deleted':
$models->withTrashed()->Deleted();
break;
}
if (Input::has('search')) {
$models = $models->TextSearch(Input::get('search'));
+1 -1
View File
@@ -53,7 +53,7 @@
{{ Form::open([
'method' => 'POST',
'route' => ['hardware/bulkedit'],
'class' => 'form-horizontal' ]) }}
'class' => 'form-horizontal' ]) }}
{{-- <div id="toolbar" class="pull-left" style="padding-top: 10px;">
<select class="form-control">
+1 -1
View File
@@ -26,7 +26,7 @@
<table
name="models"
id="table"
data-url="{{route('api.models.list')}}"
data-url="{{route('api.models.list',array('status'=>Input::get('status')))}}"
data-cookie="true"
data-click-to-select="true"
data-cookie-id-table="modelsTable-{{ Config::get('version.hash_version') }}">