summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/Task.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/Controller/Task.php b/app/Controller/Task.php
index 67dfe14f..fdd20b5e 100644
--- a/app/Controller/Task.php
+++ b/app/Controller/Task.php
@@ -488,4 +488,27 @@ class Task extends Base
'projects_list' => $projects_list,
)));
}
+
+ /**
+ * Display the time tracking details
+ *
+ * @access public
+ */
+ public function timesheet()
+ {
+ $task = $this->getTask();
+
+ $subtask_paginator = $this->paginator
+ ->setUrl('task', 'timesheet', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'pagination' => 'subtasks'))
+ ->setMax(15)
+ ->setOrder('start')
+ ->setDirection('DESC')
+ ->setQuery($this->subtaskTimeTracking->getTaskQuery($task['id']))
+ ->calculateOnlyIf($this->request->getStringParam('pagination') === 'subtasks');
+
+ $this->response->html($this->taskLayout('task/time_tracking', array(
+ 'task' => $task,
+ 'subtask_paginator' => $subtask_paginator,
+ )));
+ }
}