diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php
index 54e662b2a4..dc48effedd 100755
--- a/app/controllers/admin/AssetsController.php
+++ b/app/controllers/admin/AssetsController.php
@@ -24,6 +24,7 @@ use Log;
use DNS2D;
use Mail;
use Datatable;
+use TCPDF;
class AssetsController extends AdminController
{
@@ -799,18 +800,50 @@ class AssetsController extends AdminController
**/
public function postBulkEdit($assets = null)
{
+
+ if (!Input::has('edit_asset')) {
+ return Redirect::back()->with('error', 'No assets selected');
+ } else {
+ $asset_raw_array = Input::get('edit_asset');
+ foreach ($asset_raw_array as $asset_id => $value) {
+ $asset_ids[] = $asset_id;
+
+ }
+
+ }
+
+ if (Input::has('bulk_actions')) {
+
+
+ // Create labels
+ if (Input::get('bulk_actions')=='labels') {
+ $assets = Asset::find($asset_ids);
+ $assetcount = count($assets);
+
+ $settings = Setting::getSettings();
+ return View::make('backend/hardware/labels')->with('assets',$assets)->with('settings',$settings);
- if (Input::has('edit_asset')) {
+
+ // Bulk edit
+ } elseif (Input::get('bulk_actions')=='edit') {
+
+ $assets = Input::get('edit_asset');
+
+ $supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
+ $statuslabel_list = array('' => '') + Statuslabel::lists('name', 'id');
+ $location_list = array('' => '') + Location::lists('name', 'id');
+
+ return View::make('backend/hardware/bulk')->with('assets',$assets)->with('supplier_list',$supplier_list)->with('statuslabel_list',$statuslabel_list)->with('location_list',$location_list);
- $assets = Input::get('edit_asset');
-
- $supplier_list = array('' => '') + Supplier::orderBy('name', 'asc')->lists('name', 'id');
- $statuslabel_list = array('' => '') + Statuslabel::lists('name', 'id');
- $location_list = array('' => '') + Location::lists('name', 'id');
+
+ }
+
+ } else {
+ return Redirect::back()->with('error', 'No action selected');
}
- return View::make('backend/hardware/bulk')->with('assets',$assets)->with('supplier_list',$supplier_list)->with('statuslabel_list',$statuslabel_list)->with('location_list',$location_list);
+
}
diff --git a/app/views/backend/hardware/datatable.blade.php b/app/views/backend/hardware/datatable.blade.php
index f3ad22568e..e2306e3d84 100644
--- a/app/views/backend/hardware/datatable.blade.php
+++ b/app/views/backend/hardware/datatable.blade.php
@@ -13,7 +13,12 @@
- |
+
+
+ |
diff --git a/app/views/backend/hardware/labels.blade.php b/app/views/backend/hardware/labels.blade.php
new file mode 100644
index 0000000000..6afec696d2
--- /dev/null
+++ b/app/views/backend/hardware/labels.blade.php
@@ -0,0 +1,78 @@
+
+
+
+
+ Labels
+
+
+
+
+
+
+
+@foreach ($assets as $asset)
+
+
+
+ @if ($settings->qr_text!='')
+ {{ $settings->qr_text }}
+
+ @endif
+ @if ($asset->name!='')
+ N: {{ $asset->name }}
+
+ @endif
+ @if ($asset->asset_tag!='')
+ T: {{ $asset->asset_tag }}
+
+ @endif
+ @if ($asset->serial!='')
+ S: {{ $asset->serial }}
+
+ @endif
+
+
+
+@endforeach
+
+
+(Repeat 30 times)
+
+
+
+
+
+
diff --git a/composer.lock b/composer.lock
index ebd38527fd..a1e2db6fd5 100644
--- a/composer.lock
+++ b/composer.lock
@@ -829,12 +829,12 @@
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
- "reference": "65116c3cb0953447eac742aa4ea5fc4aaaa22db9"
+ "reference": "468d1e3da8bde049debee7f484a4f9c4b26b41ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/65116c3cb0953447eac742aa4ea5fc4aaaa22db9",
- "reference": "65116c3cb0953447eac742aa4ea5fc4aaaa22db9",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/468d1e3da8bde049debee7f484a4f9c4b26b41ba",
+ "reference": "468d1e3da8bde049debee7f484a4f9c4b26b41ba",
"shasum": ""
},
"type": "library",
@@ -860,7 +860,7 @@
"markdown",
"parser"
],
- "time": "2015-02-08 23:04:08"
+ "time": "2015-03-18 18:44:57"
},
{
"name": "filp/whoops",
@@ -926,12 +926,12 @@
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
- "reference": "e58192bb1efd7dc26c2bac9ab8ab49b0cbb4552a"
+ "reference": "8f3761154b4c1f5128365dfc32cbf757f27d97b6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Intervention/image/zipball/e58192bb1efd7dc26c2bac9ab8ab49b0cbb4552a",
- "reference": "e58192bb1efd7dc26c2bac9ab8ab49b0cbb4552a",
+ "url": "https://api.github.com/repos/Intervention/image/zipball/8f3761154b4c1f5128365dfc32cbf757f27d97b6",
+ "reference": "8f3761154b4c1f5128365dfc32cbf757f27d97b6",
"shasum": ""
},
"require": {
@@ -974,7 +974,7 @@
"thumbnail",
"watermark"
],
- "time": "2015-03-11 22:03:31"
+ "time": "2015-03-18 17:41:04"
},
{
"name": "ircmaxell/password-compat",
@@ -2863,12 +2863,12 @@
"source": {
"type": "git",
"url": "https://github.com/padraic/mockery.git",
- "reference": "8f49adc0fccd0575e2a156a52046e6c6ed7a5c60"
+ "reference": "43006b6c41e8fa9ac7469ceea2efd8abbcb20657"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/padraic/mockery/zipball/8f49adc0fccd0575e2a156a52046e6c6ed7a5c60",
- "reference": "8f49adc0fccd0575e2a156a52046e6c6ed7a5c60",
+ "url": "https://api.github.com/repos/padraic/mockery/zipball/43006b6c41e8fa9ac7469ceea2efd8abbcb20657",
+ "reference": "43006b6c41e8fa9ac7469ceea2efd8abbcb20657",
"shasum": ""
},
"require": {
@@ -2920,7 +2920,7 @@
"test double",
"testing"
],
- "time": "2015-03-13 10:47:42"
+ "time": "2015-03-19 19:27:19"
},
{
"name": "phpdocumentor/reflection-docblock",
@@ -3038,12 +3038,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "74cf128bd0f643957c076cc67121dbff445755fe"
+ "reference": "4676604b851bfc6fc02bf3394bf350c727bcebf4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/74cf128bd0f643957c076cc67121dbff445755fe",
- "reference": "74cf128bd0f643957c076cc67121dbff445755fe",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4676604b851bfc6fc02bf3394bf350c727bcebf4",
+ "reference": "4676604b851bfc6fc02bf3394bf350c727bcebf4",
"shasum": ""
},
"require": {
@@ -3092,7 +3092,7 @@
"testing",
"xunit"
],
- "time": "2015-03-06 11:27:25"
+ "time": "2015-03-19 05:49:08"
},
{
"name": "phpunit/php-file-iterator",
@@ -3282,12 +3282,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "0af3326435e98143c808ab73b8e96d016987bbfb"
+ "reference": "ab0bd2250002bcaeed9407a362eeeaf2a78fe060"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0af3326435e98143c808ab73b8e96d016987bbfb",
- "reference": "0af3326435e98143c808ab73b8e96d016987bbfb",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ab0bd2250002bcaeed9407a362eeeaf2a78fe060",
+ "reference": "ab0bd2250002bcaeed9407a362eeeaf2a78fe060",
"shasum": ""
},
"require": {
@@ -3349,7 +3349,7 @@
"testing",
"xunit"
],
- "time": "2015-03-16 14:58:13"
+ "time": "2015-03-18 05:42:02"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -3357,12 +3357,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "37e984c0d004800c456658cb08580fdfd26d9c1d"
+ "reference": "55484334fb4c306ed24bfc3bdb0874685c29036f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/37e984c0d004800c456658cb08580fdfd26d9c1d",
- "reference": "37e984c0d004800c456658cb08580fdfd26d9c1d",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/55484334fb4c306ed24bfc3bdb0874685c29036f",
+ "reference": "55484334fb4c306ed24bfc3bdb0874685c29036f",
"shasum": ""
},
"require": {
@@ -3404,7 +3404,7 @@
"mock",
"xunit"
],
- "time": "2015-03-02 06:02:35"
+ "time": "2015-03-18 09:04:51"
},
{
"name": "sebastian/comparator",