From 9194a2604d79ef97994d01c35fb454f745b5412c Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 30 Aug 2014 14:08:46 -0800 Subject: Projects management refactoring --- app/Controller/Base.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'app/Controller/Base.php') diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 41585965..f9059d1e 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -211,6 +211,22 @@ abstract class Base return $this->template->layout('task_layout', $params); } + /** + * Common layout for project views + * + * @access protected + * @param string $template Template name + * @param array $params Template parameters + * @return string + */ + protected function projectLayout($template, array $params) + { + $content = $this->template->load($template, $params); + $params['project_content_for_layout'] = $content; + + return $this->template->layout('project_layout', $params); + } + /** * Common method to get a task for task views * -- cgit v1.2.3