summaryrefslogtreecommitdiff
path: root/app/Template/project_user
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-19 20:59:05 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-19 20:59:05 -0400
commit57bd53847cfd01d414728c871512ef2af123ffd5 (patch)
treebfff76fa16997e7de8fd43dc8fb95d49d96363c1 /app/Template/project_user
parent7264821cb838fd0333c416b4921092035636616e (diff)
Improve sidebar menus
Diffstat (limited to 'app/Template/project_user')
-rw-r--r--app/Template/project_user/layout.php2
-rw-r--r--app/Template/project_user/sidebar.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/app/Template/project_user/layout.php b/app/Template/project_user/layout.php
index 23486cb7..a68fc579 100644
--- a/app/Template/project_user/layout.php
+++ b/app/Template/project_user/layout.php
@@ -16,7 +16,7 @@
</div>
<section class="sidebar-container">
- <?= $this->render('project_user/sidebar', array('users' => $users, 'action' => $action, 'filter' => $filter)) ?>
+ <?= $this->render('project_user/sidebar', array('users' => $users, 'filter' => $filter)) ?>
<div class="sidebar-content">
<div class="page-header">
diff --git a/app/Template/project_user/sidebar.php b/app/Template/project_user/sidebar.php
index f57323d5..8cc3f41b 100644
--- a/app/Template/project_user/sidebar.php
+++ b/app/Template/project_user/sidebar.php
@@ -6,22 +6,22 @@
$users,
$filter,
array(),
- array('data-redirect-url="'.$this->url->href('projectuser', $action, array('user_id' => 'USER_ID')).'"', 'data-redirect-regex="USER_ID"'),
+ array('data-redirect-url="'.$this->url->href('projectuser', $this->app->getRouterAction(), array('user_id' => 'USER_ID')).'"', 'data-redirect-regex="USER_ID"'),
'chosen-select select-auto-redirect'
) ?>
<br/><br/>
<ul>
- <li>
+ <li <?= $this->app->getRouterAction() === 'managers' ? 'class="active"' : '' ?>>
<?= $this->url->link(t('Project managers'), 'projectuser', 'managers', $filter) ?>
</li>
- <li>
+ <li <?= $this->app->getRouterAction() === 'members' ? 'class="active"' : '' ?>>
<?= $this->url->link(t('Project members'), 'projectuser', 'members', $filter) ?>
</li>
- <li>
+ <li <?= $this->app->getRouterAction() === 'opens' ? 'class="active"' : '' ?>>
<?= $this->url->link(t('Open tasks'), 'projectuser', 'opens', $filter) ?>
</li>
- <li>
+ <li <?= $this->app->getRouterAction() === 'closed' ? 'class="active"' : '' ?>>
<?= $this->url->link(t('Closed tasks'), 'projectuser', 'closed', $filter) ?>
</li>
</ul>