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

32 lines
1.0 KiB
PHTML

<?php
if (!empty($this->contacts)) {
$contactList = array();
foreach ($this->contacts as $contact) {
$contactList[] = '<a href="' . $this->href(
'monitoring/show/contact',
array(
'contact_name' => $contact->contact_name
)
) . '">' . $contact->contact_alias . '</a>';
}
echo '<strong>{{CONTACT_ICON}} Contacts:</strong> ';
echo implode(', ', $contactList);
}
if (!empty($this->contactgroups)) {
$contactGroupList = array();
foreach ($this->contactgroups as $contactgroup) {
$contactGroupList[] = '<a href="' . $this->href(
'monitoring/show/contactgroup',
array(
'contactgroup_name' => $contactgroup->contactgroup_name
)
) . '">' . $contactgroup->contactgroup_alias . '</a>';
}
echo '<strong>{{CONTACTGROUP_ICON}} Contactgroups:</strong> ';
echo implode(', ', $contactGroupList);
}
?>