From 5de091ea2821f189e867510c15e0d1d00f39b7e8 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Tue, 25 Nov 2014 20:49:26 -0500 Subject: Show the task creation form as a popover --- app/Controller/Task.php | 3 ++- app/Template/board/show.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/Controller/Task.php b/app/Controller/Task.php index b826a305..907c42cc 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -89,8 +89,9 @@ class Task extends Base public function create() { $project = $this->getProject(); + $method = $this->request->isAjax() ? 'load' : 'layout'; - $this->response->html($this->template->layout('task_new', array( + $this->response->html($this->template->$method('task_new', array( 'errors' => array(), 'values' => array( 'project_id' => $project['id'], diff --git a/app/Template/board/show.php b/app/Template/board/show.php index 66e8b46d..142969c9 100644 --- a/app/Template/board/show.php +++ b/app/Template/board/show.php @@ -9,7 +9,7 @@
- $column['project_id'], 'column_id' => $column['id']), false, '', t('Add a new task')) ?> + $column['project_id'], 'column_id' => $column['id']), false, 'task-creation-popover', t('Add a new task')) ?>
-- cgit v1.2.3