mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Make contacts' view look more like contactgroups' view
This commit is contained in:
parent
c7c2ad3790
commit
4c415aac5c
@ -5,31 +5,37 @@ $contactHelper = $this->getHelper('ContactFlags');
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs ?>
|
<?= $this->tabs ?>
|
||||||
<div style="margin: 1em">
|
<div style="margin: 1em">
|
||||||
<?= $this->sortControl->render($this); ?>
|
<?= $this->sortControl->render($this); ?>
|
||||||
</div>
|
</div>
|
||||||
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
|
<?= $this->paginationControl($contacts, null, null, array('preserve' => $this->preserve)); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content contacts">
|
<div class="content contacts">
|
||||||
<table data-base-target="_next" class="action">
|
<?php
|
||||||
<tbody>
|
if (count($contacts) === 0) {
|
||||||
|
echo t('No contacts matching the filter');
|
||||||
|
}
|
||||||
|
foreach ($contacts as $contact):
|
||||||
|
$periodLink = $this->href('monitoring/show/contacts', array('contact' => $contact->contact_name)); ?>
|
||||||
|
<div style="background-color: lightgray; padding: 0.5em; border-radius: 0.5em; overflow: hidden; margin: 0.125em; float: left;">
|
||||||
|
<img src="<?= $this->href('/static/gravatar', array('email' => $contact->contact_email )) ?>"
|
||||||
|
style="width: 60px; border: 4px solid white; border-radius: 8px; margin-right: 8px; float: left;" />
|
||||||
|
<strong><?= $contact->contact_name ?></strong> (<?= $contact->contact_alias ?>)
|
||||||
<?php
|
<?php
|
||||||
if (count($contacts) === 0) {
|
foreach (array(
|
||||||
echo t('No contacts matching the filter');
|
$contact->contact_email => 'eMail: <a href="mailto:%1$s">%1$s</a>',
|
||||||
}
|
$contact->contact_pager => 'Pager: %s',
|
||||||
foreach($contacts as $contact):
|
$contact->contact_notify_service_timeperiod => 'Service notification period: %s',
|
||||||
$periodLink = $this->href('monitoring/show/contacts', array('contact' => $contact->contact_name)); ?>
|
$contact->contact_notify_host_timeperiod => 'Host notification period: %s'
|
||||||
<tr>
|
) as $value => $format):
|
||||||
<td><?= $contact->contact_name ?></td>
|
if ($value): ?>
|
||||||
<td><?= $contact->contact_alias ?></td>
|
<br />
|
||||||
<td><?= $contact->contact_email ?></td>
|
<?php
|
||||||
<td><?= $contact->contact_pager ?></td>
|
printf($format, $value);
|
||||||
<td><?= $contactHelper->contactFlags($contact, 'service') ?></td>
|
endif;
|
||||||
<td><?= $contactHelper->contactFlags($contact, 'host') ?></td>
|
endforeach;
|
||||||
<td><?= $contact->contact_notify_service_timeperiod ?></td>
|
?>
|
||||||
<td><?= $contact->contact_notify_host_timeperiod ?></td>
|
<div class="clearfix"></div>
|
||||||
</tr>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user