mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Fixed bug in categories asset listing for hardware
This commit is contained in:
parent
ae8a03fec3
commit
062cbeb18f
|
@ -354,11 +354,20 @@ class CategoriesController extends Controller
|
||||||
|
|
||||||
foreach ($category_assets as $asset) {
|
foreach ($category_assets as $asset) {
|
||||||
|
|
||||||
|
if ($category->category_type=='asset') {
|
||||||
|
$category_type = 'hardware';
|
||||||
|
} else {
|
||||||
|
$category_type = $category->category_type;
|
||||||
|
}
|
||||||
|
|
||||||
$actions = '';
|
$actions = '';
|
||||||
$inout='';
|
$inout='';
|
||||||
|
|
||||||
if ($asset->deleted_at=='') {
|
if ($asset->deleted_at=='') {
|
||||||
$actions = '<div style=" white-space: nowrap;"><a href="'.route('clone/hardware', $asset->id).'" class="btn btn-info btn-sm" title="Clone asset"><i class="fa fa-files-o"></i></a> <a href="'.route('update/'.$category->category_type, $asset->id).'" class="btn btn-warning btn-sm"><i class="fa fa-pencil icon-white"></i></a> <a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/hardware', $asset->id).'" data-content="'.trans('admin/hardware/message.delete.confirm').'" data-title="'.trans('general.delete').' '.htmlspecialchars($asset->asset_tag).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></div>';
|
$actions = '<div style=" white-space: nowrap;">';
|
||||||
|
$actions .= '<a href="'.route('clone/hardware', $asset->id).'" class="btn btn-info btn-sm" title="Clone asset"><i class="fa fa-files-o"></i></a> ';
|
||||||
|
$actions .= '<a href="'.route('update/'.$category_type, $asset->id).'" class="btn btn-warning btn-sm"><i class="fa fa-pencil icon-white"></i></a> ';
|
||||||
|
$actions .= '<a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/hardware', $asset->id).'" data-content="'.trans('admin/hardware/message.delete.confirm').'" data-title="'.trans('general.delete').' '.htmlspecialchars($asset->asset_tag).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></div>';
|
||||||
} elseif ($asset->deleted_at!='') {
|
} elseif ($asset->deleted_at!='') {
|
||||||
$actions = '<a href="'.route('restore/hardware', $asset->id).'" class="btn btn-warning btn-sm"><i class="fa fa-recycle icon-white"></i></a>';
|
$actions = '<a href="'.route('restore/hardware', $asset->id).'" class="btn btn-warning btn-sm"><i class="fa fa-recycle icon-white"></i></a>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue