From aed7fb5cf5b04b296689771e3337b19a4a281f55 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 17 May 2014 20:25:25 -0400 Subject: Assignee change from the board is now a popover --- controllers/board.php | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'controllers') diff --git a/controllers/board.php b/controllers/board.php index 8eea4dcc..02669e3a 100644 --- a/controllers/board.php +++ b/controllers/board.php @@ -60,16 +60,30 @@ class Board extends Base if (! $project) $this->notfound(); $this->checkProjectPermissions($project['id']); - $this->response->html($this->template->layout('board_assign', array( - 'errors' => array(), - 'values' => $task, - 'users_list' => $this->project->getUsersList($project['id']), - 'projects' => $projects, - 'current_project_id' => $project['id'], - 'current_project_name' => $project['name'], - 'menu' => 'boards', - 'title' => t('Change assignee').' - '.$task['title'], - ))); + if ($this->request->isAjax()) { + + $this->response->html($this->template->load('board_assign', array( + 'errors' => array(), + 'values' => $task, + 'users_list' => $this->project->getUsersList($project['id']), + 'projects' => $projects, + 'current_project_id' => $project['id'], + 'current_project_name' => $project['name'], + ))); + } + else { + + $this->response->html($this->template->layout('board_assign', array( + 'errors' => array(), + 'values' => $task, + 'users_list' => $this->project->getUsersList($project['id']), + 'projects' => $projects, + 'current_project_id' => $project['id'], + 'current_project_name' => $project['name'], + 'menu' => 'boards', + 'title' => t('Change assignee').' - '.$task['title'], + ))); + } } /** -- cgit v1.2.3