public function getEdit($id = false) { if (!$id) { return App::abort(404); } $item = Position::find($id); if (!$item) { return App::abort(404); } $departments = Department::whereNotNull("parent_id")->orderBy("name")->get(); $roles = Positionrole::orderBy("name")->get(); $positions = Position::select(["positions.id", "positions.name", "departments.name as department_name"])->leftjoin("departments", "departments.id", "=", "positions.department_id")->where("positions.id", "<>", $id)->orderBy("departments.name")->orderBy("positions.name")->take(100)->get(); $workshifts = Workshift::all(); $content = View::make("positions/edit", ["roles" => $roles, "positions" => $positions, "departments" => $departments, "item" => $item, "workshifts" => $workshifts]); return View::make("common/tpl", array("template" => $content)); }
/** * User edit form * * @param int $id * @return \View */ public function getEdit($id = false) { if (!$id) { return App::abort(404); } $item = User::find($id); if (!$item) { return App::abort(404); } Orchestra\Asset::add("jquery-ui", "assets/js/ui/js/jquery-ui-1.10.3.custom.min.js"); Orchestra\Asset::add("jquery-ui", "assets/js/ui/css/hot-sneaks/jquery-ui-1.10.3.custom.min.css"); Orchestra\Asset::add("mask", "assets/js/mask.js"); $positions = Position::select(["positions.id", "positions.name", "departments.name as department_name"])->leftjoin("departments", "departments.id", "=", "positions.department_id")->orderBy("departments.name")->orderBy("positions.name")->get(); $content = View::make("users/edit", ["positions" => $positions, "item" => $item]); return View::make("common/tpl", array("template" => $content)); }
public function getStepedit($id = false) { if (!$id) { return App::abort(404); } $item = Businesslogicstep::find($id); if (!$item) { return App::abort(404); } $positions = Position::select(["positions.id", "positions.name", "departments.name as department_name"])->leftjoin("departments", "departments.id", "=", "positions.department_id")->orderBy("departments.name")->orderBy("positions.name")->take(100)->get(); $content = View::make("tasks/blogic/step_edit", ["item" => $item, "blogic" => $item->logic, "positions" => $positions]); return View::make("common/tpl", array("template" => $content)); }