summaryrefslogtreecommitdiff
path: root/app/Controller/BoardTooltip.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/BoardTooltip.php')
-rw-r--r--app/Controller/BoardTooltip.php112
1 files changed, 112 insertions, 0 deletions
diff --git a/app/Controller/BoardTooltip.php b/app/Controller/BoardTooltip.php
new file mode 100644
index 00000000..ed58a2f2
--- /dev/null
+++ b/app/Controller/BoardTooltip.php
@@ -0,0 +1,112 @@
+<?php
+
+namespace Kanboard\Controller;
+
+/**
+ * Board Tooltip
+ *
+ * @package controller
+ * @author Frederic Guillot
+ */
+class BoardTooltip extends Base
+{
+ /**
+ * Get links on mouseover
+ *
+ * @access public
+ */
+ public function tasklinks()
+ {
+ $task = $this->getTask();
+ $this->response->html($this->template->render('board/tooltip_tasklinks', array(
+ 'links' => $this->taskLink->getAll($task['id']),
+ 'task' => $task,
+ )));
+ }
+
+ /**
+ * Get subtasks on mouseover
+ *
+ * @access public
+ */
+ public function subtasks()
+ {
+ $task = $this->getTask();
+ $this->response->html($this->template->render('board/tooltip_subtasks', array(
+ 'subtasks' => $this->subtask->getAll($task['id']),
+ 'task' => $task,
+ )));
+ }
+
+ /**
+ * Display all attachments during the task mouseover
+ *
+ * @access public
+ */
+ public function attachments()
+ {
+ $task = $this->getTask();
+
+ $this->response->html($this->template->render('board/tooltip_files', array(
+ 'files' => $this->file->getAll($task['id']),
+ 'task' => $task,
+ )));
+ }
+
+ /**
+ * Display comments during a task mouseover
+ *
+ * @access public
+ */
+ public function comments()
+ {
+ $task = $this->getTask();
+
+ $this->response->html($this->template->render('board/tooltip_comments', array(
+ 'comments' => $this->comment->getAll($task['id'], $this->userSession->getCommentSorting())
+ )));
+ }
+
+ /**
+ * Display task description
+ *
+ * @access public
+ */
+ public function description()
+ {
+ $task = $this->getTask();
+
+ $this->response->html($this->template->render('board/tooltip_description', array(
+ 'task' => $task
+ )));
+ }
+
+ /**
+ * Get recurrence information on mouseover
+ *
+ * @access public
+ */
+ public function recurrence()
+ {
+ $task = $this->getTask();
+
+ $this->response->html($this->template->render('task/recurring_info', array(
+ 'task' => $task,
+ 'recurrence_trigger_list' => $this->task->getRecurrenceTriggerList(),
+ 'recurrence_timeframe_list' => $this->task->getRecurrenceTimeframeList(),
+ 'recurrence_basedate_list' => $this->task->getRecurrenceBasedateList(),
+ )));
+ }
+
+ /**
+ * Display swimlane description in tooltip
+ *
+ * @access public
+ */
+ public function swimlane()
+ {
+ $this->getProject();
+ $swimlane = $this->swimlane->getById($this->request->getIntegerParam('swimlane_id'));
+ $this->response->html($this->template->render('board/tooltip_description', array('task' => $swimlane)));
+ }
+}