/** * Get the detailed timesheet for this project. * */ public function detailedtimesheetAction() { $project = $this->projectService->getProject($this->_getParam('projectid')); $client = $this->clientService->getClient($this->_getParam('clientid')); $task = $this->projectService->getTask($this->_getParam('taskid')); $user = $this->userService->getUserByField('username', $this->_getParam('username')); if (!$project && !$client && !$task && !$user) { return; } if ($task) { $this->view->records = $this->projectService->getDetailedTimesheet(null, $task->id); } else { if ($project) { $start = null; $this->view->records = $this->projectService->getDetailedTimesheet(null, null, $project->id); } else { if ($client) { $start = null; $this->view->records = $this->projectService->getDetailedTimesheet(null, null, null, $client->id); } else { if ($user) { $this->view->records = $this->projectService->getDetailedTimesheet($user); } } } } $this->view->task = $task; $this->renderRawView('timesheet/ajax-timesheet-details.php'); }
/** * Returns details about a particular task. * */ public function taskdetailAction() { $this->view->task = $this->projectService->getTask((int) $this->_getParam('id')); }