summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-18 14:51:24 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-18 14:51:24 -0500
commitfb8c3352004c255de66848cd97644298a8ea452a (patch)
tree532f5e384b675eeeba0265466810a0fd528b6a4f /app/Template
parent1c5c1a5b6d4acf020006cf04864a2fc8f050b117 (diff)
Simplify custom filters table
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/custom_filter/index.php51
1 files changed, 27 insertions, 24 deletions
diff --git a/app/Template/custom_filter/index.php b/app/Template/custom_filter/index.php
index 9475c278..9180deee 100644
--- a/app/Template/custom_filter/index.php
+++ b/app/Template/custom_filter/index.php
@@ -9,43 +9,46 @@
<?php if (! empty($custom_filters)): ?>
<table class="table-striped table-scrolling">
<tr>
- <th class="column-15"><?= t('Name') ?></th>
+ <th><?= t('Name') ?></th>
<th class="column-30"><?= t('Filter') ?></th>
<th class="column-10"><?= t('Shared') ?></th>
<th class="column-15"><?= t('Append/Replace') ?></th>
- <th class="column-25"><?= t('Owner') ?></th>
- <th class="column-5"><?= t('Actions') ?></th>
+ <th class="column-20"><?= t('Owner') ?></th>
</tr>
<?php foreach ($custom_filters as $filter): ?>
<tr>
- <td><?= $this->text->e($filter['name']) ?></td>
- <td><?= $this->text->e($filter['filter']) ?></td>
<td>
- <?php if ($filter['is_shared'] == 1): ?>
- <?= t('Yes') ?>
- <?php else: ?>
- <?= t('No') ?>
- <?php endif ?>
+ <?php if ($filter['user_id'] == $this->user->getId() || $this->user->hasProjectAccess('CustomFilterController', 'edit', $project['id'])): ?>
+ <div class="dropdown">
+ <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
+ <ul>
+ <li><?= $this->modal->medium('edit', t('Edit'), 'CustomFilterController', 'edit', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?></li>
+ <li><?= $this->modal->confirm('trash-o', t('Remove'), 'CustomFilterController', 'confirm', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?></li>
+ </ul>
+ </div>
+ <?php endif ?>
+ <?= $this->text->e($filter['name']) ?>
</td>
<td>
- <?php if ($filter['append'] == 1): ?>
- <?= t('Append') ?>
- <?php else: ?>
- <?= t('Replace') ?>
- <?php endif ?>
+ <?= $this->text->e($filter['filter']) ?>
</td>
- <td><?= $this->text->e($filter['owner_name'] ?: $filter['owner_username']) ?></td>
<td>
- <?php if ($filter['user_id'] == $this->user->getId() || $this->user->hasProjectAccess('CustomFilterController', 'edit', $project['id'])): ?>
- <div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
- <ul>
- <li><?= $this->modal->medium('edit', t('Edit'), 'CustomFilterController', 'edit', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?></li>
- <li><?= $this->modal->confirm('trash-o', t('Remove'), 'CustomFilterController', 'confirm', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?></li>
- </ul>
- </div>
+ <?php if ($filter['is_shared'] == 1): ?>
+ <?= t('Yes') ?>
+ <?php else: ?>
+ <?= t('No') ?>
+ <?php endif ?>
+ </td>
+ <td>
+ <?php if ($filter['append'] == 1): ?>
+ <?= t('Append') ?>
+ <?php else: ?>
+ <?= t('Replace') ?>
<?php endif ?>
</td>
+ <td>
+ <?= $this->text->e($filter['owner_name'] ?: $filter['owner_username']) ?>
+ </td>
</tr>
<?php endforeach ?>
</table>