Add the possibility to remove a task

This commit is contained in:
Frédéric Guillot
2014-05-17 18:26:17 -04:00
parent 4d677b720e
commit f9c24f3c2c
13 changed files with 219 additions and 146 deletions

View File

@@ -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);
}
}