diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-05-17 18:26:17 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-05-17 18:26:17 -0400 |
commit | f9c24f3c2c46eccd18e70704c0e8767fa6023206 (patch) | |
tree | 0e26337e3910ef10a88a8093967748ce54bcc701 /controllers/base.php | |
parent | 4d677b720e818f9d14585479699335ec41ed3541 (diff) |
Add the possibility to remove a task
Diffstat (limited to 'controllers/base.php')
-rw-r--r-- | controllers/base.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/controllers/base.php b/controllers/base.php index 37353ff0..07c5db63 100644 --- a/controllers/base.php +++ b/controllers/base.php @@ -289,7 +289,7 @@ abstract class Base $hide_comment_form = true; } - $this->response->html($this->template->layout('task_show', array( + $this->response->html($this->taskLayout('task_show', array( 'hide_comment_form' => isset($hide_comment_form), 'comment_edit_form' => $comment_edit_form, 'comment_form' => $comment_form, @@ -302,4 +302,19 @@ abstract class Base 'title' => $task['title'], ))); } + + /** + * Common layout for task views + * + * @access protected + * @param string $template Template name + * @param array $params Template parameters + */ + protected function taskLayout($template, array $params) + { + $content = $this->template->load($template, $params); + $params['task_content_for_layout'] = $content; + + return $this->template->layout('task_layout', $params); + } } |