summaryrefslogtreecommitdiff
path: root/app/Controller/ActivityController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/ActivityController.php')
-rw-r--r--app/Controller/ActivityController.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/app/Controller/ActivityController.php b/app/Controller/ActivityController.php
new file mode 100644
index 00000000..9f9841af
--- /dev/null
+++ b/app/Controller/ActivityController.php
@@ -0,0 +1,45 @@
+<?php
+
+namespace Kanboard\Controller;
+
+/**
+ * Activity Controller
+ *
+ * @package Kanboard\Controller
+ * @author Frederic Guillot
+ */
+class ActivityController extends BaseController
+{
+ /**
+ * Activity page for a project
+ *
+ * @access public
+ */
+ public function project()
+ {
+ $project = $this->getProject();
+
+ $this->response->html($this->helper->layout->app('activity/project', array(
+ 'events' => $this->helper->projectActivity->getProjectEvents($project['id']),
+ 'project' => $project,
+ 'title' => t('%s\'s activity', $project['name'])
+ )));
+ }
+
+ /**
+ * Display task activities
+ *
+ * @access public
+ */
+ public function task()
+ {
+ $task = $this->getTask();
+
+ $this->response->html($this->helper->layout->task('activity/task', array(
+ 'title' => $task['title'],
+ 'task' => $task,
+ 'project' => $this->projectModel->getById($task['project_id']),
+ 'events' => $this->helper->projectActivity->getTaskEvents($task['id']),
+ )));
+ }
+}