diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-10-02 21:58:00 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-10-02 21:58:00 -0400 |
commit | 264b5526035be61c043a5314baa0e07e8f3f8216 (patch) | |
tree | 0bf890e1b9f1a9f9fa8948978902b829a8f4e5e5 /app/Template/project | |
parent | 370361330aeb37f02e87ab78ae38521da774c957 (diff) |
Add custom filters (refactoring of pull-request #1312)
Diffstat (limited to 'app/Template/project')
-rw-r--r-- | app/Template/project/dropdown.php | 4 | ||||
-rw-r--r-- | app/Template/project/filters.php | 11 | ||||
-rw-r--r-- | app/Template/project/sidebar.php | 3 |
3 files changed, 18 insertions, 0 deletions
diff --git a/app/Template/project/dropdown.php b/app/Template/project/dropdown.php index 96b6a43a..1eb87b0e 100644 --- a/app/Template/project/dropdown.php +++ b/app/Template/project/dropdown.php @@ -2,6 +2,10 @@ <i class="fa fa-dashboard fa-fw"></i> <?= $this->url->link(t('Activity'), 'activity', 'project', array('project_id' => $project['id'])) ?> </li> +<li> + <i class="fa fa-filter fa-fw"></i> + <?= $this->url->link(t('Custom filters'), 'customfilter', 'index', array('project_id' => $project['id'])) ?> +</li> <?php if ($project['is_public']): ?> <li> diff --git a/app/Template/project/filters.php b/app/Template/project/filters.php index 5b9ac472..c8f09fee 100644 --- a/app/Template/project/filters.php +++ b/app/Template/project/filters.php @@ -86,5 +86,16 @@ </ul> </div> <?php endif ?> + + <?php if (isset($custom_filters_list) && ! empty($custom_filters_list)): ?> + <div class="dropdown filters"> + <i class="fa fa-caret-down"></i> <a href="#" class="dropdown-menu"><?= t('My filters') ?></a> + <ul> + <?php foreach ($custom_filters_list as $filter): ?> + <li><a href="#" class="filter-helper" data-filter='<?= $this->e($filter['filter']) ?>'><?= $this->e($filter['name']) ?></a></li> + <?php endforeach ?> + </ul> + </div> + <?php endif ?> </div> </div>
\ No newline at end of file diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 482a95d2..d8b35e3b 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -4,6 +4,9 @@ <li <?= $this->app->getRouterAction() === 'show' ? 'class="active"' : '' ?>> <?= $this->url->link(t('Summary'), 'project', 'show', array('project_id' => $project['id'])) ?> </li> + <li <?= $this->app->getRouterController() === 'customfilter' && $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>> + <?= $this->url->link(t('Custom filters'), 'customfilter', 'index', array('project_id' => $project['id'])) ?> + </li> <?php if ($this->user->isProjectManagementAllowed($project['id'])): ?> <li <?= $this->app->getRouterController() === 'project' && $this->app->getRouterAction() === 'share' ? 'class="active"' : '' ?>> |