parent
d725b2feb7
commit
b9249dac4e
|
@ -424,11 +424,13 @@ class Monitoring_ListController extends Controller
|
|||
if ($url = $this->hasBetterUrl()) {
|
||||
return $this->redirectNow($url);
|
||||
}
|
||||
|
||||
$this->addTitleTab(
|
||||
'contactgroups',
|
||||
$this->translate('Contact Groups'),
|
||||
$this->translate('List contact groups')
|
||||
);
|
||||
|
||||
$query = $this->backend->select()->from('contactgroup', array(
|
||||
'contactgroup_name',
|
||||
'contactgroup_alias',
|
||||
|
@ -436,7 +438,7 @@ class Monitoring_ListController extends Controller
|
|||
'contact_alias',
|
||||
'contact_email',
|
||||
'contact_pager',
|
||||
))->order('contactgroup_alias');
|
||||
));
|
||||
$this->filterQuery($query);
|
||||
|
||||
// Fetch and prepare all contact groups:
|
||||
|
@ -453,6 +455,11 @@ class Monitoring_ListController extends Controller
|
|||
}
|
||||
// TODO: Find a better naming
|
||||
$this->view->groupData = $groupData;
|
||||
|
||||
$this->setupSortControl(array(
|
||||
'contactgroup_name' => $this->translate('Contactgroup Name'),
|
||||
'contactgroup_alias' => $this->translate('Contactgroup Alias')
|
||||
));
|
||||
}
|
||||
|
||||
public function commentsAction()
|
||||
|
|
|
@ -1,17 +1,22 @@
|
|||
<?php if (!$this->compact): ?>
|
||||
<?php if (! $this->compact): ?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?= $this->sortBox; ?>
|
||||
<?= $this->limiter; ?>
|
||||
<?= $this->paginator; ?>
|
||||
<?= $this->filterEditor; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<div class="content">
|
||||
<div class="boxview" data-base-target="_next">
|
||||
|
||||
<?php
|
||||
if (count($groupData) === 0) {
|
||||
echo mt('monitoring', 'No contacts matching the filter');
|
||||
}
|
||||
|
||||
foreach ($groupData as $groupName => $groupInfo): ?>
|
||||
if (count($groupData) === 0) {
|
||||
echo $this->translate('No contactgroups found matching the filter') . '</div>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div class="boxview" data-base-target="_next">
|
||||
<?php foreach ($groupData as $groupName => $groupInfo): ?>
|
||||
<div class="box contactgroup">
|
||||
<h2><?= $groupInfo['alias']; ?></h2>
|
||||
<?php if ($groupInfo['alias'] !== $groupName): ?>
|
||||
|
|
Loading…
Reference in New Issue