Display at least the title when there is no custom filters

This commit is contained in:
Frederic Guillot
2017-01-08 22:54:05 -05:00
parent e766397be0
commit d459bec035

View File

@@ -1,4 +1,3 @@
<?php if (! empty($custom_filters)): ?>
<div class="page-header"> <div class="page-header">
<h2><?= t('Custom filters') ?></h2> <h2><?= t('Custom filters') ?></h2>
<ul> <ul>
@@ -7,7 +6,8 @@
</li> </li>
</ul> </ul>
</div> </div>
<table class="table-striped table-scrolling"> <?php if (! empty($custom_filters)): ?>
<table class="table-striped table-scrolling">
<tr> <tr>
<th class="column-15"><?= t('Name') ?></th> <th class="column-15"><?= t('Name') ?></th>
<th class="column-30"><?= t('Filter') ?></th> <th class="column-30"><?= t('Filter') ?></th>
@@ -16,7 +16,7 @@
<th class="column-25"><?= t('Owner') ?></th> <th class="column-25"><?= t('Owner') ?></th>
<th class="column-5"><?= t('Actions') ?></th> <th class="column-5"><?= t('Actions') ?></th>
</tr> </tr>
<?php foreach ($custom_filters as $filter): ?> <?php foreach ($custom_filters as $filter): ?>
<tr> <tr>
<td><?= $this->text->e($filter['name']) ?></td> <td><?= $this->text->e($filter['name']) ?></td>
<td><?= $this->text->e($filter['filter']) ?></td> <td><?= $this->text->e($filter['filter']) ?></td>
@@ -47,7 +47,9 @@
<?php endif ?> <?php endif ?>
</td> </td>
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>
</table> </table>
<?php else: ?>
<p class="alert"><?= t('There is no custom filter.') ?></p>
<?php endif ?> <?php endif ?>