diff --git a/app/config/version.php b/app/config/version.php index 9b0f5240c5..6a981ba2cb 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ 'v2.0-pre', - 'hash_version' => 'v2.0-pre-beta-4-g15e1774', + 'hash_version' => 'v2.0-pre-beta-5-g1c2a409', ); \ No newline at end of file diff --git a/app/controllers/admin/AssetsController.php b/app/controllers/admin/AssetsController.php index 30640b23a2..2b5f6e5f5f 100755 --- a/app/controllers/admin/AssetsController.php +++ b/app/controllers/admin/AssetsController.php @@ -223,11 +223,12 @@ class AssetsController extends AdminController ->lists('name', 'id'); $supplier_list = array('' => Lang::get('general.select_supplier')) + Supplier::orderBy('name', 'asc')->lists('name', 'id'); $location_list = array('' => Lang::get('general.select_location')) + Location::orderBy('name', 'asc')->lists('name', 'id'); + $assigned_to = array('' => Lang::get('general.select_user')) + DB::table('users')->select(DB::raw('concat(first_name," ",last_name) as full_name, id'))->whereNull('deleted_at')->lists('full_name', 'id'); // Grab the dropdown list of status $statuslabel_list = Statuslabel::orderBy('name', 'asc')->lists('name', 'id'); - return View::make('backend/hardware/edit', compact('asset'))->with('model_list',$model_list)->with('supplier_list',$supplier_list)->with('location_list',$location_list)->with('statuslabel_list',$statuslabel_list); + return View::make('backend/hardware/edit', compact('asset'))->with('model_list',$model_list)->with('supplier_list',$supplier_list)->with('location_list',$location_list)->with('statuslabel_list',$statuslabel_list)->with('assigned_to',$assigned_to); } @@ -1060,7 +1061,7 @@ class AssetsController extends AdminController { if ($assets->assetstatus) { - + if ($assets->assetstatus->deployable != 0) { if (($assets->assigned_to !='') && ($assets->assigned_to > 0)) { return ''.Lang::get('general.checkin').''; diff --git a/app/routes.php b/app/routes.php index 1cb043fe21..74f56b02b5 100755 --- a/app/routes.php +++ b/app/routes.php @@ -16,7 +16,9 @@ Route::group(array('prefix' => 'api', 'namespace' => 'Controllers\Admin', 'befor Route::get('{statuslabelId}/deployable', function ($statuslabelId) { $statuslabel = Statuslabel::find($statuslabelId); if (($statuslabel->deployable=='1') && ($statuslabel->pending!='1') && ($statuslabel->archived!='1')) { - return $statuslabel->deployable; + return '1'; + } else { + return '0'; } }); }); diff --git a/app/views/backend/hardware/edit.blade.php b/app/views/backend/hardware/edit.blade.php index 50ad77fbe7..104ee15730 100755 --- a/app/views/backend/hardware/edit.blade.php +++ b/app/views/backend/hardware/edit.blade.php @@ -166,7 +166,9 @@
@lang('admin/hardware/form.help_checkout')
{{ $errors->first('status_id', '