Notification Overview: Use $query->hasResult() instead of $query->count()

refs #9632
This commit is contained in:
Johannes Meyer 2015-08-03 15:35:17 +02:00
parent 29fd849cca
commit 6f0b51ed8f
1 changed files with 3 additions and 7 deletions

View File

@ -12,13 +12,6 @@ if (! $this->compact): ?>
</div> </div>
<?php endif ?> <?php endif ?>
<div class="content"> <div class="content">
<?php
if (count($notifications) === 0) {
echo $this->translate('No notifications found matching the filter') . '</div>';
return;
}
?>
<table data-base-target="_next" class="action"> <table data-base-target="_next" class="action">
<tbody> <tbody>
<?php foreach ($notifications as $notification): <?php foreach ($notifications as $notification):
@ -71,4 +64,7 @@ if (count($notifications) === 0) {
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
<?php if (! $notifications->hasResult()): ?>
<?= $this->translate('No notifications found matching the filter'); ?>
<?php endif ?>
</div> </div>