summaryrefslogtreecommitdiff
path: root/app/Controller/User.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/User.php')
-rw-r--r--app/Controller/User.php27
1 files changed, 25 insertions, 2 deletions
diff --git a/app/Controller/User.php b/app/Controller/User.php
index a02da7a9..3d44f226 100644
--- a/app/Controller/User.php
+++ b/app/Controller/User.php
@@ -190,6 +190,29 @@ class User extends Base
}
/**
+ * Display timesheet
+ *
+ * @access public
+ */
+ public function timesheet()
+ {
+ $user = $this->getUser();
+
+ $subtask_paginator = $this->paginator
+ ->setUrl('user', 'timesheet', array('user_id' => $user['id'], 'pagination' => 'subtasks'))
+ ->setMax(20)
+ ->setOrder('start')
+ ->setDirection('DESC')
+ ->setQuery($this->subtaskTimeTracking->getUserQuery($user['id']))
+ ->calculateOnlyIf($this->request->getStringParam('pagination') === 'subtasks');
+
+ $this->response->html($this->layout('user/timesheet', array(
+ 'subtask_paginator' => $subtask_paginator,
+ 'user' => $user,
+ )));
+ }
+
+ /**
* Display last connections
*
* @access public
@@ -450,7 +473,7 @@ class User extends Base
*
* @access public
*/
- public function gitHub()
+ public function github()
{
$code = $this->request->getStringParam('code');
@@ -494,7 +517,7 @@ class User extends Base
*
* @access public
*/
- public function unlinkGitHub()
+ public function unlinkGithub()
{
$this->checkCSRFParam();