monitoring: Don't render an empty table if there are no services to list

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-24 14:56:22 +02:00
parent a053c3a6e3
commit 64b7315379
1 changed files with 17 additions and 15 deletions

View File

@ -20,6 +20,10 @@ if (! $this->compact): ?>
</div>
<?php endif ?>
<div class="content">
<?php if (! $services->hasResult()): ?>
<p><?= $this->translate('No services found matching the filter.') ?></p>
</div>
<?php return; endif ?>
<table data-base-target="_next"
class="action-table multiselect<?php if ($this->compact): ?> compact<?php endif ?>"
data-icinga-multiselect-url="<?= $this->href('monitoring/services/show') ?>"
@ -96,19 +100,17 @@ if (! $this->compact): ?>
<?php endforeach ?>
</tbody>
</table>
<?php if (! $services->hasResult()): ?>
<?= $this->translate('No services found matching the filter'); ?>
<?php elseif ($services->hasMore()): ?>
<div class="text-right">
<?= $this->qlink(
$this->translate('Show More'),
$this->url()->without(array('view', 'limit')),
null,
array(
'data-base-target' => '_next',
'class' => 'action-link'
)
) ?>
</div>
<?php endif ?>
<?php if ($services->hasMore()): ?>
<div class="text-right">
<?= $this->qlink(
$this->translate('Show More'),
$this->url()->without(array('view', 'limit')),
null,
array(
'data-base-target' => '_next',
'class' => 'action-link'
)
) ?>
</div>
<?php endif ?>
</div>