diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 3e6abce48..61fb84956 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -467,8 +467,10 @@ class Monitoring_ListController extends Controller if ($url = $this->hasBetterUrl()) { return $this->redirectNow($url); } + $this->addTitleTab('comments', $this->translate('Comments'), $this->translate('List comments')); $this->setAutorefreshInterval(12); + $query = $this->backend->select()->from('comment', array( 'id' => 'comment_internal_id', 'objecttype' => 'comment_objecttype', @@ -486,6 +488,8 @@ class Monitoring_ListController extends Controller $this->filterQuery($query); $this->view->comments = $query->paginate(); + $this->setupLimitControl(); + $this->setupPaginationControl($this->view->comments); $this->setupSortControl( array( 'comment_timestamp' => $this->translate('Comment Timestamp'), diff --git a/modules/monitoring/application/views/scripts/list/comments.phtml b/modules/monitoring/application/views/scripts/list/comments.phtml index cdbe28244..ee752b037 100644 --- a/modules/monitoring/application/views/scripts/list/comments.phtml +++ b/modules/monitoring/application/views/scripts/list/comments.phtml @@ -1,20 +1,20 @@ -<?php if (false === $this->compact): ?> +<?php if (! $this->compact): ?> <div class="controls"> - <?= $this->tabs->render($this); ?> - <div style="margin: 1em" class="dontprint"> - <?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?> - </div> - <?= $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?> - <?= $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?> + <?= $this->tabs; ?> + <?= $this->sortBox; ?> + <?= $this->limiter; ?> + <?= $this->paginator; ?> + <?= $this->filterEditor; ?> </div> <?php endif ?> - <div class="content"> -<?php if (count($comments) === 0): ?> - <?= $this->translate('No comments matching the filter'); ?> -</div> -<?php return; endif ?> +<?php +if (count($comments) === 0) { + echo $this->translate('No comments found matching the filter') . '</div>'; + return; +} +?> <table data-base-target="_next" class="action comments"> <tbody> <?php foreach ($comments as $comment): ?>