icingaweb2/modules/monitoring/application/views/scripts/show/components/contacts.phtml

40 lines
983 B
PHTML

<?php
if (! empty($object->contacts)) {
$list = array();
foreach ($object->contacts as $contact) {
$list[] = $this->qlink($contact->contact_alias, 'monitoring/show/contact', array(
'contact_name' => $contact->contact_name
));
}
printf(
"<tr><th>%s</th><td>%s %s</td></tr>\n",
$this->translate('Contacts'),
$this->img('img/icons/user_petrol.png'),
implode(', ', $list)
);
}
if (! empty($object->contactgroups)) {
$list = array();
foreach ($object->contactgroups as $contactgroup) {
$list[] = $this->qlink(
$contactgroup->contactgroup_alias,
'monitoring/list/contactgroups',
array('contactgroup_name' => $contactgroup->contactgroup_name)
);
}
printf(
"<tr><th>%s</th><td>%s %s</td></tr>\n",
$this->translate('Contactgroups'),
$this->img('img/icons/user_petrol.png'),
implode(', ', $list)
);
}