parent
a09e41e3b8
commit
d725b2feb7
|
@ -339,7 +339,9 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab('contacts', $this->translate('Contacts'), $this->translate('List contacts'));
|
||||
|
||||
$query = $this->backend->select()->from('contact', array(
|
||||
'contact_name',
|
||||
'contact_id',
|
||||
|
@ -363,6 +365,8 @@ class Monitoring_ListController extends Controller
|
|||
$this->filterQuery($query);
|
||||
$this->view->contacts = $query->paginate();
|
||||
|
||||
$this->setupLimitControl();
|
||||
$this->setupPaginationControl($this->view->contacts);
|
||||
$this->setupSortControl(array(
|
||||
'contact_name' => $this->translate('Name'),
|
||||
'contact_alias' => $this->translate('Alias'),
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<div style="margin: 1em">
|
||||
<?= $this->sortControl->render($this); ?>
|
||||
</div>
|
||||
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
<div data-base-target="_next" class="content contacts">
|
||||
<?php
|
||||
if (count($contacts) === 0) {
|
||||
echo $this->translate('No contacts matching the filter');
|
||||
return;
|
||||
}
|
||||
foreach ($contacts as $contact): ?>
|
||||
<?php
|
||||
|
||||
if (count($contacts) === 0) {
|
||||
echo $this->translate('No contacts found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<?php foreach ($contacts as $contact): ?>
|
||||
<div class="contact">
|
||||
<?= $this->img('/static/gravatar', array('email' => $contact->contact_email)); ?>
|
||||
<strong><?= $this->qlink(
|
||||
|
|
Loading…
Reference in New Issue