diff --git a/ChangeLog b/ChangeLog index e4b2be65f..c3c293050 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ Improvements: * Set dynamically column height based on viewport size * Enable support for Github Enterprise when using Github Authentication * Update iCalendar library to display organizer name +* Improve sidebar menus * Run automated unit tests with Sqlite/Mysql/Postgres on Travis-ci * Add Makefile and remove the scripts directory diff --git a/app/Controller/Projectuser.php b/app/Controller/Projectuser.php index dba069c90..4456ce3dd 100644 --- a/app/Controller/Projectuser.php +++ b/app/Controller/Projectuser.php @@ -65,7 +65,6 @@ class Projectuser extends Base $this->response->html($this->layout('project_user/roles', array( 'paginator' => $paginator, 'title' => $title, - 'action' => $action, 'user_id' => $user_id, 'users' => $users, ))); @@ -92,7 +91,6 @@ class Projectuser extends Base $this->response->html($this->layout('project_user/tasks', array( 'paginator' => $paginator, 'title' => $title, - 'action' => $action, 'user_id' => $user_id, 'users' => $users, ))); diff --git a/app/Core/Router.php b/app/Core/Router.php index ae989de53..6e7576d6d 100644 --- a/app/Core/Router.php +++ b/app/Core/Router.php @@ -10,6 +10,22 @@ namespace Core; */ class Router extends Base { + /** + * Controller + * + * @access private + * @var string + */ + private $controller = ''; + + /** + * Action + * + * @access private + * @var string + */ + private $action = ''; + /** * Store routes for path lookup * @@ -26,6 +42,28 @@ class Router extends Base */ private $urls = array(); + /** + * Get action + * + * @access public + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Get controller + * + * @access public + * @return string + */ + public function getController() + { + return $this->controller; + } + /** * Get the path to compare patterns * @@ -208,6 +246,9 @@ class Router extends Base return false; } + $this->action = $method; + $this->controller = $controller; + $instance = new $class($this->container); $instance->beforeAction($controller, $method); $instance->$method(); diff --git a/app/Helper/App.php b/app/Helper/App.php index 8f5911439..e5ebefcba 100644 --- a/app/Helper/App.php +++ b/app/Helper/App.php @@ -10,6 +10,28 @@ namespace Helper; */ class App extends \Core\Base { + /** + * Get router controller + * + * @access public + * @return string + */ + public function getRouterController() + { + return $this->router->getController(); + } + + /** + * Get router action + * + * @access public + * @return string + */ + public function getRouterAction() + { + return $this->router->getAction(); + } + /** * Get javascript language code * diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php index 59cc1fa6a..c942f7ed2 100644 --- a/app/Template/analytic/sidebar.php +++ b/app/Template/analytic/sidebar.php @@ -1,22 +1,22 @@