diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 13:41:54 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 13:41:54 -0400 |
commit | 1353929a7dbd3f2e897fa7d3ab88e959ca573f9f (patch) | |
tree | 30bdbac4e466e74c3dfb4d451422f03c62bcbe41 /app/Controller/BoardTooltipController.php | |
parent | ab48a09f0d674b703467975b376c5ac7352670ae (diff) |
Rename controllers
Diffstat (limited to 'app/Controller/BoardTooltipController.php')
-rw-r--r-- | app/Controller/BoardTooltipController.php | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/app/Controller/BoardTooltipController.php b/app/Controller/BoardTooltipController.php new file mode 100644 index 00000000..2f1d949e --- /dev/null +++ b/app/Controller/BoardTooltipController.php @@ -0,0 +1,127 @@ +<?php + +namespace Kanboard\Controller; + +/** + * Board Tooltip + * + * @package Kanboard\Controller + * @author Frederic Guillot + */ +class BoardTooltipController extends BaseController +{ + /** + * 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->getAllGroupedByLabel($task['id']), + 'task' => $task, + ))); + } + + /** + * Get links on mouseover + * + * @access public + */ + public function externallinks() + { + $task = $this->getTask(); + $this->response->html($this->template->render('board/tooltip_external_links', array( + 'links' => $this->taskExternalLink->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->taskFile->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( + 'task' => $task, + '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_recurrence/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))); + } +} |