summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-12 11:49:56 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-12 11:50:35 -0400
commite57386a18393e85f073cccff70699ad9afc19119 (patch)
treec66968991251c5115cbc756a039706f30842b9a5 /app/Template
parent23826592b85f3573bb55cf3ee4336fbb46bfa18f (diff)
parent6c021baa8d9867ff2720c19e93bad4c8db0696e9 (diff)
Merge pull-request #1350
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/custom_filter/add.php2
-rw-r--r--app/Template/custom_filter/edit.php4
-rw-r--r--app/Template/custom_filter/index.php10
-rw-r--r--app/Template/project/filters.php2
4 files changed, 15 insertions, 3 deletions
diff --git a/app/Template/custom_filter/add.php b/app/Template/custom_filter/add.php
index d4e102b3..61df148c 100644
--- a/app/Template/custom_filter/add.php
+++ b/app/Template/custom_filter/add.php
@@ -15,6 +15,8 @@
<?php if ($this->user->isProjectManagementAllowed($project['id'])): ?>
<?= $this->form->checkbox('is_shared', t('Share with all project members'), 1) ?>
<?php endif ?>
+
+ <?= $this->form->checkbox('append', t('Append filter (instead of replacement)'), 1) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue">
diff --git a/app/Template/custom_filter/edit.php b/app/Template/custom_filter/edit.php
index 7525574c..9d296b84 100644
--- a/app/Template/custom_filter/edit.php
+++ b/app/Template/custom_filter/edit.php
@@ -21,7 +21,9 @@
<?php else: ?>
<?= $this->form->hidden('is_shared', $values) ?>
<?php endif ?>
-
+
+ <?= $this->form->checkbox('append', t('Append filter (instead of replacement)'), 1, $values['append'] == 1) ?>
+
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue">
<?= t('or') ?>
diff --git a/app/Template/custom_filter/index.php b/app/Template/custom_filter/index.php
index a53d0d0a..c857e206 100644
--- a/app/Template/custom_filter/index.php
+++ b/app/Template/custom_filter/index.php
@@ -8,6 +8,7 @@
<th><?= t('Name') ?></th>
<th><?= t('Filter') ?></th>
<th><?= t('Shared') ?></th>
+ <th><?= t('Append/Replace') ?></th>
<th><?= t('Owner') ?></th>
<th><?= t('Actions') ?></th>
</tr>
@@ -22,6 +23,13 @@
<?= t('No') ?>
<?php endif ?>
</td>
+ <td>
+ <?php if ($filter['append'] == 1): ?>
+ <?= t('Append') ?>
+ <?php else: ?>
+ <?= t('Replace') ?>
+ <?php endif ?>
+ </td>
<td><?= $this->e($filter['owner_name'] ?: $filter['owner_username']) ?></td>
<td>
<?php if ($filter['user_id'] == $this->user->getId() || $this->user->isProjectManagementAllowed($project['id'])): ?>
@@ -37,4 +45,4 @@
</div>
<?php endif ?>
-<?= $this->render('custom_filter/add', array('project' => $project, 'values' => $values, 'errors' => $errors)) ?> \ No newline at end of file
+<?= $this->render('custom_filter/add', array('project' => $project, 'values' => $values, 'errors' => $errors)) ?>
diff --git a/app/Template/project/filters.php b/app/Template/project/filters.php
index c22d7b4f..eee691c5 100644
--- a/app/Template/project/filters.php
+++ b/app/Template/project/filters.php
@@ -68,7 +68,7 @@
<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>
+ <li><a href="#" class="filter-helper" data-<?php if($filter['append']): ?><?= 'append-' ?><?php endif ?>filter='<?= $this->e($filter['filter']) ?>'><?= $this->e($filter['name']) ?></a></li>
<?php endforeach ?>
</ul>
</div>