Added statuslabel type helper

This commit is contained in:
snipe
2015-08-12 22:33:31 -07:00
parent 3d77666ad1
commit a832346bfb
2 changed files with 7 additions and 0 deletions
@@ -63,6 +63,7 @@ class AssetsController extends AdminController
$category_list = categoryList();
$supplier_list = suppliersList();
$assigned_to = assignedToList();
$statuslabel_types = statusTypeList();
$view = View::make('backend/hardware/edit');
$view->with('supplier_list',$supplier_list);
@@ -73,6 +74,7 @@ class AssetsController extends AdminController
$view->with('asset',new Asset);
$view->with('manufacturer',$manufacturer_list);
$view->with('category',$category_list);
$view->with('statuslabel_types',$statuslabel_types);
if (!is_null($model_id)) {
$selected_model = Model::find($model_id);
+5
View File
@@ -53,3 +53,8 @@ function manufacturerList() {
$manufacturer_list = array('' => 'Select One') + Manufacturer::lists('name', 'id');
return $manufacturer_list;
}
function statusTypeList() {
$statuslabel_types = array('' => Lang::get('admin/hardware/form.select_statustype')) + array('undeployable' => Lang::get('admin/hardware/general.undeployable')) + array('pending' => Lang::get('admin/hardware/general.pending')) + array('archived' => Lang::get('admin/hardware/general.archived')) + array('deployable' => Lang::get('admin/hardware/general.deployable'));
return $statuslabel_types;
}