public function actionSubList() { if (EnvUtil::getRequest("op") == "getsubordinates") { $this->getsubordinates(); exit; } $getUid = intval(EnvUtil::getRequest("uid")); if (!$getUid) { $deptArr = UserUtil::getManagerDeptSubUserByUid(Ibos::app()->user->uid); if (!empty($deptArr)) { $firstDept = reset($deptArr); $uid = $firstDept["user"][0]["uid"]; } else { $this->error(IBos::lang("You do not subordinate"), $this->createUrl("schedule/index")); } } else { $uid = $getUid; } if (!UserUtil::checkIsSub(Ibos::app()->user->uid, $uid)) { $this->error(Ibos::lang("No permission to view schedule"), $this->createUrl("schedule/index")); } $params = $this->getUnfinishedDataByUid($uid); $this->setPageTitle(Ibos::lang("Assignment")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Assignment"), "url" => $this->createUrl("unfinished/index")), array("name" => Ibos::lang("Unfinished list")))); $this->render("sublist", $params); }
public function actionSubSchedule() { $op = EnvUtil::getRequest("op"); if ($op == "getsubordinates") { $this->getsubordinates(); } elseif ($op == "list") { $this->getList(); } else { $workTime = Ibos::app()->setting->get("setting/calendarworkingtime"); $workingtime = explode(",", $workTime); $setting = array("worktimestart" => $workingtime[0], "worktimeend" => $workingtime[1], "allowAdd" => CalendarUtil::getIsAllowAdd(), "allowEdit" => CalendarUtil::getIsAllowEdit()); $getUid = EnvUtil::getRequest("uid"); if (!$getUid) { $deptArr = UserUtil::getManagerDeptSubUserByUid($this->uid); if (!empty($deptArr)) { $firstDept = reset($deptArr); $uid = $firstDept["user"][0]["uid"]; } else { $this->error(IBos::lang("You do not subordinate"), $this->createUrl("schedule/index")); } } else { $uid = $getUid; } if (!UserUtil::checkIsSub(Ibos::app()->user->uid, $uid)) { $this->error(Ibos::lang("No permission to view schedule"), $this->createUrl("schedule/index")); } $data = array("setting" => $setting, "user" => User::model()->fetchByUid($uid), "supUid" => UserUtil::getSupUid($this->uid)); $this->setPageTitle(Ibos::lang("Subordinate schedule")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Personal Office")), array("name" => Ibos::lang("Calendar arrangement"), "url" => $this->createUrl("schedule/index")), array("name" => Ibos::lang("Subordinate schedule")))); $this->render("subschedule", $data); } }
protected function getSubSidebar() { $deptArr = UserUtil::getManagerDeptSubUserByUid(Ibos::app()->user->uid); $sidebarAlias = "application.modules.calendar.views.subsidebar"; $sidebarView = $this->renderPartial($sidebarAlias, array("deptArr" => $deptArr), true); return $sidebarView; }
public function getSidebar() { $uid = Ibos::app()->user->uid; $deptArr = UserUtil::getManagerDeptSubUserByUid($uid); $sidebarAlias = "application.modules.report.views.stats.sidebar"; $params = array("lang" => Ibos::getLangSource("report.default"), "deptArr" => $deptArr, "dashboardConfig" => $this->getReportConfig(), "statModule" => Ibos::app()->setting->get("setting/statmodules")); $sidebarView = $this->renderPartial($sidebarAlias, $params, false); return $sidebarView; }
protected function getSubSidebar() { $uid = Ibos::app()->user->uid; $deptArr = UserUtil::getManagerDeptSubUserByUid($uid); $params = array("deptArr" => $deptArr, "unfinishCount" => Assignment::model()->getUnfinishCountByUid($uid)); $sidebarAlias = "application.modules.assignment.views.subsidebar"; $sidebarView = $this->renderPartial($sidebarAlias, $params, true); return $sidebarView; }
public function getSidebar($getUid, $getUser) { $uid = Ibos::app()->user->uid; if (!empty($getUid)) { $subUids = $getUid; } elseif (!empty($getUser)) { $subUids = ConvertUtil::getSubByKey($getUser, "uid"); } else { $subUids = UserUtil::getAllSubs($uid, "", true); } $deptArr = UserUtil::getManagerDeptSubUserByUid($uid); $sidebarAlias = "application.modules.report.views.review.sidebar"; $params = array("statModule" => Ibos::app()->setting->get("setting/statmodules"), "lang" => Ibos::getLangSource("report.default"), "deptArr" => $deptArr, "dashboardConfig" => $this->getReportConfig(), "reportTypes" => ReportType::model()->fetchAllTypeByUid($subUids)); $sidebarView = $this->renderPartial($sidebarAlias, $params, false); return $sidebarView; }
public function run() { $data = array("typeid" => EnvUtil::getRequest("typeid"), "lang" => Ibos::getLangSource("report.default"), "deptArr" => UserUtil::getManagerDeptSubUserByUid(Ibos::app()->user->uid), "dashboardConfig" => ReportUtil::getSetting(), "deptRoute" => $this->inStats() ? "stats/review" : "review/index", "userRoute" => $this->inStats() ? "stats/review" : "review/personal"); $this->render(self::VIEW, $data); }
public function run() { $data = array("deptArr" => UserUtil::getManagerDeptSubUserByUid(Ibos::app()->user->uid), "dashboardConfig" => DiaryUtil::getSetting(), "deptRoute" => $this->inStats() ? "stats/review" : "review/index", "userRoute" => $this->inStats() ? "stats/review" : "review/personal", "fromController" => $this->getController()->getId()); $this->render(self::VIEW, $data); }