Hide bulk actions, checkbox and checkout/in if deleted

This commit is contained in:
snipe 2016-06-29 04:19:37 -07:00
parent 345a0da337
commit 0c98390eef
2 changed files with 6 additions and 3 deletions

View file

@ -1494,7 +1494,7 @@ class AssetsController extends Controller
}
if ($asset->assetstatus) {
if ($asset->assetstatus->deployable != 0) {
if (($asset->assetstatus->deployable != 0) && ($asset->deleted_at=='')) {
if (($asset->assigned_to !='') && ($asset->assigned_to > 0)) {
$inout = '<a href="'.route('checkin/hardware', $asset->id).'" class="btn btn-primary btn-sm" title="Checkin this asset" data-toggle="tooltip">'.trans('general.checkin').'</a>';
} else {

View file

@ -47,7 +47,7 @@
'class' => 'form-inline' ]) }}
<div class="row">
<div class="col-md-12">
@if (Input::get('status')!='Deleted')
<div id="toolbar">
<select name="bulk_actions" class="form-control select2">
<option value="edit">Edit</option>
@ -55,7 +55,8 @@
<option value="labels">Generate Labels</option>
</select>
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
</div>
</div>
@endif
<table
@ -70,7 +71,9 @@
data-cookie-id-table="{{ e(Input::get('status')) }}assetTable-{{ config('version.hash_version') }}">
<thead>
<tr>
@if (Input::get('status')!='Deleted')
<th data-class="hidden-xs" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox"><div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;"></div></th>
@endif
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
<th data-field="companyName" data-searchable="true" data-sortable="true" data-switchable="true" data-visible="false">{{ trans('general.company') }}</th>
<th data-sortable="true" data-field="image" data-visible="false">{{ trans('admin/hardware/table.image') }}</th>