show/contact: Ensure dashboard compliance

refs #7876
This commit is contained in:
Johannes Meyer 2015-04-17 16:10:49 +02:00
parent 9388944283
commit 3f092ffb2d
2 changed files with 7 additions and 3 deletions

View File

@ -145,9 +145,7 @@ class Monitoring_ShowController extends Controller
'contact_notify_host_flapping', 'contact_notify_host_flapping',
'contact_notify_host_downtime', 'contact_notify_host_downtime',
)); ));
$query->where('contact_name', $contactName); $query->where('contact_name', $contactName);
$contact = $query->getQuery()->fetchRow(); $contact = $query->getQuery()->fetchRow();
if ($contact) { if ($contact) {
@ -171,6 +169,8 @@ class Monitoring_ShowController extends Controller
$notifications->where('contact_object_id', $contact->contact_object_id); $notifications->where('contact_object_id', $contact->contact_object_id);
$this->view->notifications = $notifications->paginate(); $this->view->notifications = $notifications->paginate();
$this->setupLimitControl();
$this->setupPaginationControl($this->view->notifications);
} }
$this->view->contact = $contact; $this->view->contact = $contact;

View File

@ -1,6 +1,8 @@
<?php $contactHelper = $this->getHelper('ContactFlags') ?> <?php $contactHelper = $this->getHelper('ContactFlags') ?>
<div class="controls"> <div class="controls">
<?= $this->tabs ?> <?php if (! $this->compact): ?>
<?= $this->tabs; ?>
<?php endif ?>
<h1><?= $this->translate('Contact details') ?></h1> <h1><?= $this->translate('Contact details') ?></h1>
<div class="circular" style="background-image: url('<?= <div class="circular" style="background-image: url('<?=
$this->href('static/gravatar', array('email' => $contact->contact_email)) $this->href('static/gravatar', array('email' => $contact->contact_email))
@ -54,6 +56,8 @@
</ul> </ul>
<?php endif ?> <?php endif ?>
<h1><?= $this->translate('Notifications sent to this contact') ?></h1> <h1><?= $this->translate('Notifications sent to this contact') ?></h1>
<?= $this->limiter; ?>
<?= $this->paginator; ?>
</div> </div>
<?php if (count($notifications)): ?> <?php if (count($notifications)): ?>