summaryrefslogtreecommitdiff
path: root/app/Controller/Board.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/Board.php')
-rw-r--r--app/Controller/Board.php193
1 files changed, 3 insertions, 190 deletions
diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index 7442ff22..a75fea33 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -51,7 +51,7 @@ class Board extends Base
$this->response->html($this->template->layout('board/view_private', array(
'categories_list' => $this->category->getList($params['project']['id'], false),
- 'users_list' => $this->projectPermission->getMemberList($params['project']['id'], false),
+ 'users_list' => $this->projectUserRole->getAssignableUsersList($params['project']['id'], false),
'custom_filters_list' => $this->customFilter->getAll($params['project']['id'], $this->userSession->getId()),
'swimlanes' => $this->taskFilter->search($params['filters']['search'])->getBoard($params['project']['id']),
'description' => $params['project']['description'],
@@ -143,195 +143,6 @@ class Board 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
- )));
- }
-
- /**
- * Change a task assignee directly from the board
- *
- * @access public
- */
- public function changeAssignee()
- {
- $task = $this->getTask();
- $project = $this->project->getById($task['project_id']);
-
- $this->response->html($this->template->render('board/popover_assignee', array(
- 'values' => $task,
- 'users_list' => $this->projectPermission->getMemberList($project['id']),
- 'project' => $project,
- )));
- }
-
- /**
- * Validate an assignee modification
- *
- * @access public
- */
- public function updateAssignee()
- {
- $values = $this->request->getValues();
-
- list($valid, ) = $this->taskValidator->validateAssigneeModification($values);
-
- if ($valid && $this->taskModification->update($values)) {
- $this->flash->success(t('Task updated successfully.'));
- } else {
- $this->flash->failure(t('Unable to update your task.'));
- }
-
- $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $values['project_id'])));
- }
-
- /**
- * Change a task category directly from the board
- *
- * @access public
- */
- public function changeCategory()
- {
- $task = $this->getTask();
- $project = $this->project->getById($task['project_id']);
-
- $this->response->html($this->template->render('board/popover_category', array(
- 'values' => $task,
- 'categories_list' => $this->category->getList($project['id']),
- 'project' => $project,
- )));
- }
-
- /**
- * Validate a category modification
- *
- * @access public
- */
- public function updateCategory()
- {
- $values = $this->request->getValues();
-
- list($valid, ) = $this->taskValidator->validateCategoryModification($values);
-
- if ($valid && $this->taskModification->update($values)) {
- $this->flash->success(t('Task updated successfully.'));
- } else {
- $this->flash->failure(t('Unable to update your task.'));
- }
-
- $this->response->redirect($this->helper->url->to('board', 'show', array('project_id' => $values['project_id'])));
- }
-
- /**
- * Screenshot popover
- *
- * @access public
- */
- public function screenshot()
- {
- $task = $this->getTask();
-
- $this->response->html($this->template->render('file/screenshot', array(
- 'task' => $task,
- 'redirect' => 'board',
- )));
- }
-
- /**
- * 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)));
- }
-
- /**
* Enable collapsed mode
*
* @access public
@@ -355,6 +166,7 @@ class Board extends Base
* Change display mode
*
* @access private
+ * @param boolean $mode
*/
private function changeDisplayMode($mode)
{
@@ -372,6 +184,7 @@ class Board extends Base
* Render board
*
* @access private
+ * @param integer $project_id
*/
private function renderBoard($project_id)
{