CategoriesController.php
Go to the documentation of this file.
84 return Redirect::to("admin/settings/categories")->with('success', trans('admin/categories/message.create.success'));
93 return Redirect::to('admin/settings/categories/create')->with('error', trans('admin/categories/message.create.error'));
112 return Redirect::to('admin/settings/categories')->with('error', trans('admin/categories/message.does_not_exist'));
118 $category_options = array('' => 'Top Level') + DB::table('categories')->where('id', '!=', $categoryId)->lists('name', 'id');
141 return Redirect::to('admin/categories')->with('error', trans('admin/categories/message.does_not_exist'));
154 return Redirect::to("admin/settings/categories")->with('success', trans('admin/categories/message.update.success'));
179 return Redirect::to('admin/settings/categories')->with('error', trans('admin/categories/message.not_found'));
184 return Redirect::to('admin/settings/categories')->with('error', trans('admin/categories/message.assoc_models'));
187 return Redirect::to('admin/settings/categories')->with('error', trans('admin/categories/message.assoc_accessories'));
190 return Redirect::to('admin/settings/categories')->with('error', trans('admin/categories/message.assoc_consumables'));
193 return Redirect::to('admin/settings/categories')->with('error', trans('admin/categories/message.assoc_components'));
199 return Redirect::to('admin/settings/categories')->with('success', trans('admin/categories/message.delete.success'));
279 $actions = '<a href="'.route('update/category', $category->id).'" class="btn btn-warning btn-sm" style="margin-right:5px;">';
285 $actions .=' data-toggle="modal" href="'.route('delete/category', $category->id).'" data-content="'.trans('admin/categories/message.delete.confirm').'" data-title="'.trans('general.delete').' '.htmlspecialchars($category->name).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a>';
288 'name' => (string)link_to('/admin/settings/categories/'.$category->id.'/view', $category->name) ,
361 $actions = '<div style=" white-space: nowrap;"><a href="'.route('clone/hardware', $asset->id).'" class="btn btn-info btn-sm" title="Clone asset"><i class="fa fa-files-o"></i></a> <a href="'.route('update/'.$category->category_type, $asset->id).'" class="btn btn-warning btn-sm"><i class="fa fa-pencil icon-white"></i></a> <a data-html="false" class="btn delete-asset btn-danger btn-sm" data-toggle="modal" href="'.route('delete/hardware', $asset->id).'" data-content="'.trans('admin/hardware/message.delete.confirm').'" data-title="'.trans('general.delete').' '.htmlspecialchars($asset->asset_tag).'?" onClick="return false;"><i class="fa fa-trash icon-white"></i></a></div>';
363 $actions = '<a href="'.route('restore/hardware', $asset->id).'" class="btn btn-warning btn-sm"><i class="fa fa-recycle icon-white"></i></a>';
369 $inout = '<a href="'.route('checkin/hardware', $asset->id).'" class="btn btn-primary btn-sm">'.trans('general.checkin').'</a>';
371 $inout = '<a href="'.route('checkout/hardware', $asset->id).'" class="btn btn-info btn-sm">'.trans('general.checkout').'</a>';
382 'assigned_to' => ($asset->assigneduser) ? (string)link_to(config('app.url').'/admin/users/'.$asset->assigneduser->id.'/view', $asset->assigneduser->fullName()): '',
getDelete($categoryId)
Validates and marks a category as deleted.
Definition: CategoriesController.php:174
Definition: AccessoriesController.php:2
getEdit($categoryId=null)
Returns a view that makes a form to update a category.
Definition: CategoriesController.php:107
Definition: Controller.php:30
getIndex()
Returns a view that invokes the ajax tables which actually contains the content for the categories li...
Definition: CategoriesController.php:35
This class controls all actions related to Categories for the Snipe-IT Asset Management application...
Definition: CategoriesController.php:23
getView($categoryId=null)
Returns a view that invokes the ajax tables which actually contains the content for the categories de...
Definition: CategoriesController.php:217
getDataView($categoryID)
Returns JSON response that contains the data for the category detail page.
Definition: CategoriesController.php:315
postEdit($categoryId=null)
Validates and stores the updated category data.
Definition: CategoriesController.php:136
getDatatable()
Returns a JSON response with the data to populate the bootstrap table on the cateory listing page...
Definition: CategoriesController.php:244