list/notifications: don't show contact...

...when showing notifications for a single contact, other cleanup.

refs #7104
This commit is contained in:
Thomas Gelf 2014-09-05 18:16:05 +02:00
parent 9ea377fd45
commit fe6a1b1f0f

View File

@ -1,15 +1,13 @@
<?php if (!$this->compact): ?> <?php if (!$this->compact): ?>
<div class="controls"> <div class="controls">
<?= $this->tabs ?> <?= $this->tabs ?>
<div class="dontprint"> <div class="dontprint" style="margin: 1em;">
<?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?> <?= $this->translate('Sort by') ?> <?= $this->sortControl->render($this) ?>
<?= $this->selectionToolbar('single') ?> </div>
</div> <?= $this->widget('limiter') ?>
<?= $this->widget('limiter') ?> <?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
<?php if ($notifications->count() >= 100): ?><br /><?php endif ?> </div>
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
</div>
<?php endif ?> <?php endif ?>
<div class="content"> <div class="content">
@ -47,7 +45,7 @@ foreach ($notifications as $notification):
?> ?>
<tr class="state <?= $stateName ?>"> <tr class="state <?= $stateName ?>">
<td class="state"><?= $this->timeSince($notification->notification_start_time) ?></td> <td class="state"><?= $this->timeSince($notification->notification_start_time) ?></td>
<td> <td style="font-size: 0.8em">
<?php if ($isService): ?> <?php if ($isService): ?>
<a href="<?= $href ?>"><?= $notification->service ?></a> on <?= $notification->host ?> <a href="<?= $href ?>"><?= $notification->service ?></a> on <?= $notification->host ?>
<?php else: ?> <?php else: ?>
@ -56,12 +54,14 @@ foreach ($notifications as $notification):
<br /> <br />
<?= $this->escape(substr(strip_tags($notification->notification_output), 0, 10000)); ?> <?= $this->escape(substr(strip_tags($notification->notification_output), 0, 10000)); ?>
<br /> <br />
<?php if (!$this->contact): ?>
<small> <small>
Sent to <a href="<?= $this->href( Sent to <a href="<?= $this->href(
'monitoring/show/contact', 'monitoring/show/contact',
array('contact' => $notification->notification_contact) array('contact' => $notification->notification_contact)
) ?>"><?= $this->escape($notification->notification_contact) ?></a> ) ?>"><?= $this->escape($notification->notification_contact) ?></a>
</small> </small>
<?php endif ?>
</td> </td>
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>