From d1a306cfd8b891728197c1d1654a88cda980c6bd Mon Sep 17 00:00:00 2001 From: mtucker6784 Date: Mon, 9 Nov 2015 08:25:29 -0700 Subject: [PATCH 01/14] Yay, asset image progress! --- app/controllers/admin/AssetsController.php | 31 +++++++++++++++++++++- app/lang/en/admin/hardware/table.php | 1 + app/lang/en/general.php | 1 + app/views/backend/hardware/edit.blade.php | 28 ++++++++++++++++--- app/views/backend/hardware/index.blade.php | 1 + app/views/backend/hardware/view.blade.php | 21 ++++++++++----- 6 files changed, 72 insertions(+), 11 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index c2de106483..cc2a4e36b5 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -2,6 +2,7 @@ use AdminController; use Input; +use Image; use Lang; use Asset; use Supplier; @@ -29,6 +30,7 @@ use Paginator; use Manufacturer; //for embedded-create use Artisan; use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\HttpFoundation\JsonResponse; class AssetsController extends AdminController @@ -169,6 +171,18 @@ class AssetsController extends AdminController $asset->physical = '1'; $asset->depreciate = '0'; + // Create the image (if one was chosen.) + if (Input::file('image')) { + $image = Input::file('image'); + $file_name = str_random(25).".".$image->getClientOriginalExtension(); + $path = public_path('uploads/assets/'.$file_name); + Image::make($image->getRealPath())->resize(300, null, function ($constraint) { + $constraint->aspectRatio(); + $constraint->upsize(); + })->save($path); + $asset->image = $file_name; + + // Was the asset created? if($asset->save()) { @@ -181,7 +195,7 @@ class AssetsController extends AdminController $logaction->note = e(Input::get('note')); $log = $logaction->logaction('checkout'); } - + } // Redirect to the asset listing page return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.create.success')); } @@ -308,6 +322,20 @@ class AssetsController extends AdminController $asset->notes = e(Input::get('notes')); $asset->physical = '1'; + // Update the image + if (Input::file('image')) { + $image = Input::file('image'); + $file_name = str_random(25).".".$image->getClientOriginalExtension(); + $path = public_path('uploads/assets/'.$file_name); + Image::make($image->getRealPath())->resize(300, null, function ($constraint) { + $constraint->aspectRatio(); + $constraint->upsize(); + })->save($path); + $asset->image = $file_name; + } + + + // Was the asset updated? if($asset->save()) { // Redirect to the new asset page @@ -1208,6 +1236,7 @@ class AssetsController extends AdminController $rows[] = array( 'checkbox' =>'
', 'id' => $asset->id, + 'image' => ($asset->image!='') ? '' : (($asset->model->image!='') ? '' : ''), 'name' => ''.$asset->name.'', 'asset_tag' => ''.$asset->asset_tag.'', 'serial' => $asset->serial, diff --git a/app/lang/en/admin/hardware/table.php b/app/lang/en/admin/hardware/table.php index 62dbc28ce1..e8baa09d5a 100755 --- a/app/lang/en/admin/hardware/table.php +++ b/app/lang/en/admin/hardware/table.php @@ -18,6 +18,7 @@ return array( 'serial' => 'Serial', 'status' => 'Status', 'title' => 'Asset ', + 'image' => 'Device Image', 'days_without_acceptance' => 'Days Without Acceptance' ); diff --git a/app/lang/en/general.php b/app/lang/en/general.php index c9ddda5ab5..bc35d9e3ef 100755 --- a/app/lang/en/general.php +++ b/app/lang/en/general.php @@ -140,4 +140,5 @@ 'years' => 'years', 'yes' => 'Yes', 'zip' => 'Zip', + 'noimage' => 'No image uploaded or image not found.', ]; diff --git a/app/views/backend/hardware/edit.blade.php b/app/views/backend/hardware/edit.blade.php index d313f3e418..6402f2207a 100755 --- a/app/views/backend/hardware/edit.blade.php +++ b/app/views/backend/hardware/edit.blade.php @@ -113,9 +113,9 @@
@if ($asset->id) -
+ @else - + @endif @@ -300,11 +300,33 @@
+ + @if ($asset->image) +
+ +
+ {{ Form::checkbox('image_delete') }} + + {{ $errors->first('image_delete', '
:message') }} +
+
+ @endif + +
+ +
+ {{ Form::file('image') }} + {{ $errors->first('image', '
:message') }} +
+
+ + +
diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 128a9bd262..9d05ee5421 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -67,6 +67,7 @@
@lang('general.id') + @lang('admin/hardware/table.image') @lang('admin/hardware/form.name') @lang('admin/hardware/table.asset_tag') @lang('admin/hardware/table.serial') diff --git a/app/views/backend/hardware/view.blade.php b/app/views/backend/hardware/view.blade.php index a146644c38..3b3ffa607a 100755 --- a/app/views/backend/hardware/view.blade.php +++ b/app/views/backend/hardware/view.blade.php @@ -38,8 +38,6 @@
  • @lang('admin/hardware/general.clone')
  • - - @@ -47,7 +45,6 @@
    - @if ($asset->model->deleted_at!='')
    @@ -144,6 +141,7 @@ @endif + @if ($asset->model->eol)
    @lang('admin/hardware/form.eol_rate'): @@ -178,10 +176,11 @@
    +
    Software Assigned
    -
    - + + @if (count($asset->licenses) > 0) @@ -295,8 +294,6 @@ @else {{{ $file->filename }}} @endif - -
    @if ($file->filename) @@ -408,6 +405,14 @@ @endif + + @if ($asset->image) +
    + @else +

    @lang('general.noimage')


    + @endif + + @if (($asset->assigneduser) && ($asset->assigned_to > 0) && ($asset->deleted_at==''))

    @lang('admin/hardware/form.checkedout_to')
    @@ -415,6 +420,8 @@


  • {{ $asset->assigneduser->fullName() }}
  • +
    + @if (isset($asset->userloc)) From 4509631921da7eaad2638a1b3d7687f2918383a2 Mon Sep 17 00:00:00 2001 From: mtucker6784 Date: Mon, 9 Nov 2015 08:47:05 -0700 Subject: [PATCH 02/14] Add image column migration --- .../migrations/2015_11_05_183749_image.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 app/database/migrations/2015_11_05_183749_image.php diff --git a/app/database/migrations/2015_11_05_183749_image.php b/app/database/migrations/2015_11_05_183749_image.php new file mode 100644 index 0000000000..a9a33a8e39 --- /dev/null +++ b/app/database/migrations/2015_11_05_183749_image.php @@ -0,0 +1,35 @@ +text('image')->after('notes')->nullable(); + // + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('assets', function(Blueprint $table) + { + // + }); + } + +} From effad46cc0d9652ad7304c981795ae3f91f99772 Mon Sep 17 00:00:00 2001 From: mtucker6784 Date: Mon, 9 Nov 2015 09:16:53 -0700 Subject: [PATCH 03/14] create assets image directory --- public/uploads/assets/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/uploads/assets/.gitkeep diff --git a/public/uploads/assets/.gitkeep b/public/uploads/assets/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 From d7f8d0fc0466873c4244d792c311366408c9f39b Mon Sep 17 00:00:00 2001 From: mtucker6784 Date: Mon, 9 Nov 2015 09:35:10 -0700 Subject: [PATCH 04/14] Changed image save location in AssetsController --- app/controllers/admin/AssetsController.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index cc2a4e36b5..ce9b8b81b9 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -171,17 +171,6 @@ class AssetsController extends AdminController $asset->physical = '1'; $asset->depreciate = '0'; - // Create the image (if one was chosen.) - if (Input::file('image')) { - $image = Input::file('image'); - $file_name = str_random(25).".".$image->getClientOriginalExtension(); - $path = public_path('uploads/assets/'.$file_name); - Image::make($image->getRealPath())->resize(300, null, function ($constraint) { - $constraint->aspectRatio(); - $constraint->upsize(); - })->save($path); - $asset->image = $file_name; - // Was the asset created? if($asset->save()) { @@ -195,6 +184,17 @@ class AssetsController extends AdminController $logaction->note = e(Input::get('note')); $log = $logaction->logaction('checkout'); } + // Create the image (if one was chosen.) + if (Input::file('image')) { + $image = Input::file('image'); + $file_name = str_random(25).".".$image->getClientOriginalExtension(); + $path = public_path('uploads/assets/'.$file_name); + Image::make($image->getRealPath())->resize(300, null, function ($constraint) { + $constraint->aspectRatio(); + $constraint->upsize(); + })->save($path); + $asset->image = $file_name; + } // Redirect to the asset listing page return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.create.success')); From 90009db1b51305c7ff49183eadea00785667ac68 Mon Sep 17 00:00:00 2001 From: mtucker6784 Date: Mon, 9 Nov 2015 12:01:31 -0700 Subject: [PATCH 05/14] Image is now recorded upon initial asset creation. --- app/controllers/admin/AssetsController.php | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index ce9b8b81b9..087414f720 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -171,6 +171,18 @@ class AssetsController extends AdminController $asset->physical = '1'; $asset->depreciate = '0'; + // Create the image (if one was chosen.) + if (Input::file('image')) { + $image = Input::file('image'); + $file_name = str_random(25).".".$image->getClientOriginalExtension(); + $path = public_path('uploads/assets/'.$file_name); + Image::make($image->getRealPath())->resize(300, null, function ($constraint) { + $constraint->aspectRatio(); + $constraint->upsize(); + })->save($path); + $asset->image = $file_name; + + } // Was the asset created? if($asset->save()) { @@ -184,18 +196,6 @@ class AssetsController extends AdminController $logaction->note = e(Input::get('note')); $log = $logaction->logaction('checkout'); } - // Create the image (if one was chosen.) - if (Input::file('image')) { - $image = Input::file('image'); - $file_name = str_random(25).".".$image->getClientOriginalExtension(); - $path = public_path('uploads/assets/'.$file_name); - Image::make($image->getRealPath())->resize(300, null, function ($constraint) { - $constraint->aspectRatio(); - $constraint->upsize(); - })->save($path); - $asset->image = $file_name; - - } // Redirect to the asset listing page return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.create.success')); } From b9c36f863833188bd0462d809985bd876f36c6d7 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 10 Nov 2015 18:02:06 -0800 Subject: [PATCH 06/14] Fixes #1335 - editing maintenance --- app/controllers/admin/AssetMaintenancesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/AssetMaintenancesController.php b/app/controllers/admin/AssetMaintenancesController.php index c7431df7c7..7959bad096 100644 --- a/app/controllers/admin/AssetMaintenancesController.php +++ b/app/controllers/admin/AssetMaintenancesController.php @@ -83,7 +83,7 @@ foreach($maintenances as $maintenance) { - $actions = ''; + $actions = ''; if (($maintenance->cost) && ($maintenance->asset->assetloc) && ($maintenance->asset->assetloc->currency!='')) { $maintenance_cost = $maintenance->asset->assetloc->currency.$maintenance->cost; From 75bd29b027a8d79ee2882aa822204450ac3dff5f Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Nov 2015 14:50:17 -0800 Subject: [PATCH 07/14] Added cookie expiration for sorting/filtering --- app/views/backend/accessories/index.blade.php | 1 + app/views/backend/asset_maintenances/index.blade.php | 1 + app/views/backend/categories/index.blade.php | 1 + app/views/backend/consumables/index.blade.php | 1 + app/views/backend/depreciations/index.blade.php | 1 + app/views/backend/hardware/index.blade.php | 1 + app/views/backend/locations/index.blade.php | 1 + app/views/backend/manufacturers/index.blade.php | 1 + app/views/backend/models/index.blade.php | 2 ++ app/views/backend/suppliers/index.blade.php | 1 + app/views/backend/users/index.blade.php | 1 + 11 files changed, 12 insertions(+) diff --git a/app/views/backend/accessories/index.blade.php b/app/views/backend/accessories/index.blade.php index 7837d93aee..fe92543684 100755 --- a/app/views/backend/accessories/index.blade.php +++ b/app/views/backend/accessories/index.blade.php @@ -71,6 +71,7 @@ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/asset_maintenances/index.blade.php b/app/views/backend/asset_maintenances/index.blade.php index 53caad3bec..6f1b52b077 100644 --- a/app/views/backend/asset_maintenances/index.blade.php +++ b/app/views/backend/asset_maintenances/index.blade.php @@ -64,6 +64,7 @@ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/categories/index.blade.php b/app/views/backend/categories/index.blade.php index 9757256735..e1c60d6210 100755 --- a/app/views/backend/categories/index.blade.php +++ b/app/views/backend/categories/index.blade.php @@ -69,6 +69,7 @@ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/consumables/index.blade.php b/app/views/backend/consumables/index.blade.php index c7c1d6f017..f689658464 100644 --- a/app/views/backend/consumables/index.blade.php +++ b/app/views/backend/consumables/index.blade.php @@ -69,6 +69,7 @@ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/depreciations/index.blade.php b/app/views/backend/depreciations/index.blade.php index d036fa25ba..1ccfc505aa 100755 --- a/app/views/backend/depreciations/index.blade.php +++ b/app/views/backend/depreciations/index.blade.php @@ -67,6 +67,7 @@ $('#table').bootstrapTable({ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/hardware/index.blade.php b/app/views/backend/hardware/index.blade.php index 128a9bd262..1c125d4c4b 100755 --- a/app/views/backend/hardware/index.blade.php +++ b/app/views/backend/hardware/index.blade.php @@ -119,6 +119,7 @@ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/locations/index.blade.php b/app/views/backend/locations/index.blade.php index f127a13129..5445a19b4a 100755 --- a/app/views/backend/locations/index.blade.php +++ b/app/views/backend/locations/index.blade.php @@ -66,6 +66,7 @@ Locations :: sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/manufacturers/index.blade.php b/app/views/backend/manufacturers/index.blade.php index 61d26bb783..4bc40d5b4d 100755 --- a/app/views/backend/manufacturers/index.blade.php +++ b/app/views/backend/manufacturers/index.blade.php @@ -80,6 +80,7 @@ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/models/index.blade.php b/app/views/backend/models/index.blade.php index d4d753730a..7a0410106b 100755 --- a/app/views/backend/models/index.blade.php +++ b/app/views/backend/models/index.blade.php @@ -65,6 +65,8 @@ sortable: true, mobileResponsive: true, showExport: true, + cookie: true, + cookieExpire: '2y', showColumns: true, maintainSelected: true, paginationFirstText: "@lang('general.first')", diff --git a/app/views/backend/suppliers/index.blade.php b/app/views/backend/suppliers/index.blade.php index c4b406676f..89c2ff5cd5 100755 --- a/app/views/backend/suppliers/index.blade.php +++ b/app/views/backend/suppliers/index.blade.php @@ -63,6 +63,7 @@ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, diff --git a/app/views/backend/users/index.blade.php b/app/views/backend/users/index.blade.php index f207cb40d4..b74f007202 100755 --- a/app/views/backend/users/index.blade.php +++ b/app/views/backend/users/index.blade.php @@ -113,6 +113,7 @@ sidePagination: 'server', sortable: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, From ab3871f678ed621d3910508d918a8c1ea3f4af52 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Nov 2015 15:56:01 -0800 Subject: [PATCH 08/14] Small changes for PR #1330 --- .gitignore | 1 + app/controllers/admin/AssetsController.php | 2 +- .../migrations/2015_11_05_183749_image.php | 15 +++++++-------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index c1315449fe..d9cb306538 100755 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ app/config/local/session.php app/storage/dumps/* tests/_support/_generated/* tests/_data/scenarios +public/uploads/assets/* diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 087414f720..be999b0fae 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -1236,7 +1236,7 @@ class AssetsController extends AdminController $rows[] = array( 'checkbox' =>'
    ', 'id' => $asset->id, - 'image' => ($asset->image!='') ? '' : (($asset->model->image!='') ? '' : ''), + 'image' => ($asset->image!='') ? '' : (($asset->model->image!='') ? '' : ''), 'name' => ''.$asset->name.'', 'asset_tag' => ''.$asset->asset_tag.'', 'serial' => $asset->serial, diff --git a/app/database/migrations/2015_11_05_183749_image.php b/app/database/migrations/2015_11_05_183749_image.php index a9a33a8e39..8d5749a43a 100644 --- a/app/database/migrations/2015_11_05_183749_image.php +++ b/app/database/migrations/2015_11_05_183749_image.php @@ -14,7 +14,7 @@ class Image extends Migration { { Schema::table('assets', function(Blueprint $table) { - $table->text('image')->after('notes')->nullable(); + $table->text('image')->after('notes')->nullable()->default(NULL); // }); } @@ -24,12 +24,11 @@ class Image extends Migration { * * @return void */ - public function down() - { - Schema::table('assets', function(Blueprint $table) - { - // - }); - } + public function down() + { + Schema::table('assets', function ($table) { + $table->dropColumn('image'); + }); + } } From 3c8959e92d0f4d0b8586816659a0e9ba9d01c96a Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Nov 2015 15:56:10 -0800 Subject: [PATCH 09/14] Bumped version --- app/config/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/version.php b/app/config/version.php index 789b9589c9..466d59c1f3 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v2.0.5-pre', - 'hash_version' => 'v2.0.5-pre-3-gc1961c0', + 'hash_version' => 'v2.0.5-pre-47-g7297a60', ); \ No newline at end of file From 1a4926ce1394ca6f5184b8852641867ed93ed021 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Nov 2015 15:57:41 -0800 Subject: [PATCH 10/14] Sort by asset image for PR #1330 --- app/config/version.php | 2 +- app/controllers/admin/AssetsController.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 466d59c1f3..354ad93383 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v2.0.5-pre', - 'hash_version' => 'v2.0.5-pre-47-g7297a60', + 'hash_version' => 'v2.0.5-pre-48-gab3871f', ); \ No newline at end of file diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index be999b0fae..4e9327330f 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -1184,7 +1184,8 @@ class AssetsController extends AdminController 'notes', 'expected_checkin', 'order_number', - 'location' + 'location', + 'image', ]; $order = Input::get('order') === 'asc' ? 'asc' : 'desc'; From a0599712a6ecafd68304cce72549bfc63feda2b2 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Nov 2015 16:06:07 -0800 Subject: [PATCH 11/14] Show model image if available and no asset image --- app/config/version.php | 2 +- app/views/backend/hardware/view.blade.php | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 354ad93383..5055306c45 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v2.0.5-pre', - 'hash_version' => 'v2.0.5-pre-48-gab3871f', + 'hash_version' => 'v2.0.5-pre-49-g3c8959e', ); \ No newline at end of file diff --git a/app/views/backend/hardware/view.blade.php b/app/views/backend/hardware/view.blade.php index 3b3ffa607a..ee5cf34bf7 100755 --- a/app/views/backend/hardware/view.blade.php +++ b/app/views/backend/hardware/view.blade.php @@ -88,7 +88,7 @@ @if ($asset->purchase_cost)
    @lang('admin/hardware/form.cost'): - + @if (($asset->id) && ($asset->userloc)) {{{ $asset->userloc->currency }}} @elseif (($asset->id) && ($asset->assetloc)) @@ -405,12 +405,15 @@ @endif - - @if ($asset->image) -
    - @else -

    @lang('general.noimage')


    - @endif + + + @if ($asset->image) + + @else + @if ($asset->model->image!='') + + @endif + @endif From bbe0189be228fdd0552cc4d5272ad0a3e9501127 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Nov 2015 16:06:17 -0800 Subject: [PATCH 12/14] CSS for max image size on asset view --- app/config/version.php | 2 +- public/assets/css/compiled/layout.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/config/version.php b/app/config/version.php index 5055306c45..56d83238c3 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v2.0.5-pre', - 'hash_version' => 'v2.0.5-pre-49-g3c8959e', + 'hash_version' => 'v2.0.5-pre-50-g1a4926c', ); \ No newline at end of file diff --git a/public/assets/css/compiled/layout.css b/public/assets/css/compiled/layout.css index 70c43e79d4..7f56548093 100644 --- a/public/assets/css/compiled/layout.css +++ b/public/assets/css/compiled/layout.css @@ -9,3 +9,8 @@ To remove this comment, please support us and upgrade to SiteFlow Pro. div.checker { display: inline; } + +.assetimg { + max-width: 250px; + max-height: 250px; +} From aa05d041bd7abd193ea580c0928326d4855b522f Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Nov 2015 17:22:28 -0800 Subject: [PATCH 13/14] Fixes #1324 - missing $inout variable when if/else not met --- app/config/version.php | 2 +- app/controllers/admin/CategoriesController.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/config/version.php b/app/config/version.php index 56d83238c3..4ad7e72767 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v2.0.5-pre', - 'hash_version' => 'v2.0.5-pre-50-g1a4926c', + 'hash_version' => 'v2.0.5-pre-51-ga059971', ); \ No newline at end of file diff --git a/app/controllers/admin/CategoriesController.php b/app/controllers/admin/CategoriesController.php index 0ffeb6e9b3..f77edc22a6 100755 --- a/app/controllers/admin/CategoriesController.php +++ b/app/controllers/admin/CategoriesController.php @@ -299,6 +299,8 @@ class CategoriesController extends AdminController foreach ($category_assets as $asset) { $actions = ''; + $inout=''; + if ($asset->deleted_at=='') { $actions = '
    '; } elseif ($asset->deleted_at!='') { From 2afc2525497e36d285c58e156c0b99355af8f185 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 11 Nov 2015 17:43:24 -0800 Subject: [PATCH 14/14] Link to category listing from accessories --- app/config/version.php | 2 +- app/controllers/admin/AccessoriesController.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/config/version.php b/app/config/version.php index 4ad7e72767..eca2bd13a9 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v2.0.5-pre', - 'hash_version' => 'v2.0.5-pre-51-ga059971', + 'hash_version' => 'v2.0.5-pre-52-gbbe0189', ); \ No newline at end of file diff --git a/app/controllers/admin/AccessoriesController.php b/app/controllers/admin/AccessoriesController.php index 2d6d25b05c..dbcb7d1503 100755 --- a/app/controllers/admin/AccessoriesController.php +++ b/app/controllers/admin/AccessoriesController.php @@ -69,19 +69,19 @@ class AccessoriesController extends AdminController $accessory->name = e(Input::get('name')); $accessory->category_id = e(Input::get('category_id')); $accessory->order_number = e(Input::get('order_number')); - + if (e(Input::get('purchase_date')) == '') { $accessory->purchase_date = NULL; } else { $accessory->purchase_date = e(Input::get('purchase_date')); } - + if (e(Input::get('purchase_cost')) == '0.00') { $accessory->purchase_cost = NULL; } else { $accessory->purchase_cost = ParseFloat(e(Input::get('purchase_cost'))); } - + $accessory->qty = e(Input::get('qty')); $accessory->user_id = Sentry::getId(); @@ -151,19 +151,19 @@ class AccessoriesController extends AdminController $accessory->name = e(Input::get('name')); $accessory->category_id = e(Input::get('category_id')); $accessory->order_number = e(Input::get('order_number')); - + if (e(Input::get('purchase_date')) == '') { $accessory->purchase_date = NULL; } else { $accessory->purchase_date = e(Input::get('purchase_date')); } - + if (e(Input::get('purchase_cost')) == '0.00') { $accessory->purchase_cost = NULL; } else { $accessory->purchase_cost = ParseFloat(e(Input::get('purchase_cost'))); } - + $accessory->qty = e(Input::get('qty')); // Was the accessory created? @@ -529,7 +529,7 @@ class AccessoriesController extends AdminController $rows[] = array( 'name' => link_to('admin/accessories/'.$accessory->id.'/view', $accessory->name), - 'category' => $accessory->category->name, + 'category' => link_to('admin/settings/categories/'.$accessory->category->id.'/view', $accessory->category->name), 'qty' => $accessory->qty, 'order_number' => $accessory->order_number, 'purchase_date' => $accessory->purchase_date,