Make project creation form a inline popup

This commit is contained in:
Frederic Guillot
2016-01-31 20:14:51 -05:00
parent 0bc51620c7
commit 271543431e
7 changed files with 40 additions and 11 deletions

32
app/Helper/Layout.php Normal file
View File

@@ -0,0 +1,32 @@
<?php
namespace Kanboard\Helper;
use Kanboard\Core\Base;
/**
* Layout helpers
*
* @package helper
* @author Frederic Guillot
*/
class Layout extends Base
{
/**
* Render a template without the layout if Ajax request
*
* @access public
* @param string $template Template name
* @param array $params Template parameters
* @return string
*/
public function app($template, array $params = array())
{
if ($this->request->isAjax()) {
return $this->template->render($template, $params);
}
$params['board_selector'] = $this->projectUserRole->getActiveProjectsByUser($this->userSession->getId());
return $this->template->layout($template, $params);
}
}