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'); $viewHelper = $this->getHelper('MonitoringState');
$contactHelper = $this->getHelper('ContactFlags'); $contactHelper = $this->getHelper('ContactFlags');
?> ?>
<div class="row"> <div class="controls">
<div class="pull-left"> <?= $this->tabs ?>
<h1>Contacts</h1> <div style="margin: 1em">
</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">
<?= $this->sortControl->render($this); ?> <?= $this->sortControl->render($this); ?>
</div> </div>
</div>
<div class="row">
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?> <?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
</div> </div>
</div>
<table class="table table-condensed pull-left"> <div class="content contacts">
<table data-base-target="_next" class="action">
<tbody> <tbody>
<?php <?php
if (count($contacts) === 0) { if (count($contacts) === 0) {
echo t('No contacts matching the filter'); echo t('No contacts matching the filter');
} }
?> foreach($contacts as $contact):
<?php foreach($contacts as $contact): ?> $periodLink = $this->href('monitoring/show/contacts', array('contact' => $contact->contact_name)); ?>
<?php $periodLink = $this->href('monitoring/show/contacts', array('contact' => $contact->contact_name)); ?>
<tr> <tr>
<td><?= $contact->contact_name ?></td> <td><?= $contact->contact_name ?></td>
<td><?= $contact->contact_alias ?></td> <td><?= $contact->contact_alias ?></td>
@ -47,8 +32,4 @@ $contactHelper = $this->getHelper('ContactFlags');
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </table>
<div class="pull-left">
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
</div>
</div> </div>