From 4c8c58d4531a8fe39cac407e8d772055dd11db6d Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 18 Aug 2016 12:31:45 -0700 Subject: [PATCH] Clean up divs for gates in list view --- app/Http/Controllers/AssetsController.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 92f4997d52..5217ac1fed 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -1709,23 +1709,25 @@ class AssetsController extends Controller $rows = array(); foreach ($assets as $asset) { $inout = ''; - $actions = ''; + $actions = '
'; if ($asset->deleted_at=='') { if (Gate::allows('assets.create')) { - $actions = '
'; + $actions = ' '; } if (Gate::allows('assets.edit')) { - $actions .= ' id) . '" class="btn btn-warning btn-sm" title="Edit asset" data-toggle="tooltip"> '; } if (Gate::allows('assets.delete')) { $actions .= '
'; + $asset->id) . '" data-content="' . trans('admin/hardware/message.delete.confirm') . '" data-title="' . trans('general.delete') . ' ' . htmlspecialchars($asset->asset_tag) . '?" onClick="return false;">'; } } elseif ($asset->model->deleted_at=='') { $actions = ''; } + + $actions .= '
'; if (($asset->availableForCheckout())) { @@ -1770,7 +1772,7 @@ class AssetsController extends Controller 'companyName' => is_null($asset->company) ? '' : e($asset->company->name) ); foreach ($all_custom_fields as $field) { - $row[$field->db_column_name()]=$asset->{$field->db_column_name()}; + $row[$field->db_column_name()] = Helper::parseEscapedMarkedown($asset->{$field->db_column_name()}); } $rows[]=$row; }