Make contacts' view work like the downtimes' one

fixes #6513
This commit is contained in:
Alexander Klimov 2014-07-15 10:46:13 +02:00
parent e567ad67c5
commit d021ddebee
1 changed files with 18 additions and 37 deletions

View File

@ -2,38 +2,23 @@
$viewHelper = $this->getHelper('MonitoringState');
$contactHelper = $this->getHelper('ContactFlags');
?>
<div class="row">
<div class="pull-left">
<h1>Contacts</h1>
</div>
<div class="pull-right">
<?= $this->tabs->render($this); ?>
</div>
</div>
<div data-icinga-component="app/mainDetailGrid" data-icinga-grid-selection-type="none">
<div class="container pull-left">
<div class="row">
<div class="col-md-12">
<div class="controls">
<?= $this->tabs ?>
<div style="margin: 1em">
<?= $this->sortControl->render($this); ?>
</div>
</div>
<div class="row">
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
</div>
</div>
<table class="table table-condensed pull-left">
<div class="content contacts">
<table data-base-target="_next" class="action">
<tbody>
<?php
if (count($contacts) === 0) {
echo t('No contacts matching the filter');
}
?>
<?php foreach($contacts as $contact): ?>
<?php $periodLink = $this->href('monitoring/show/contacts', array('contact' => $contact->contact_name)); ?>
foreach($contacts as $contact):
$periodLink = $this->href('monitoring/show/contacts', array('contact' => $contact->contact_name)); ?>
<tr>
<td><?= $contact->contact_name ?></td>
<td><?= $contact->contact_alias ?></td>
@ -47,8 +32,4 @@ $contactHelper = $this->getHelper('ContactFlags');
<?php endforeach; ?>
</tbody>
</table>
<div class="pull-left">
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
</div>
</div>