Swap array keys and values
Non-hardcoded keys may be not unique
This commit is contained in:
parent
62da942159
commit
b23e36aa1a
|
@ -10,7 +10,7 @@ $contactHelper = $this->getHelper('ContactFlags');
|
||||||
<?= $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 data-base-target="_next" class="content contacts">
|
||||||
<?php
|
<?php
|
||||||
if (count($contacts) === 0) {
|
if (count($contacts) === 0) {
|
||||||
echo t('No contacts matching the filter');
|
echo t('No contacts matching the filter');
|
||||||
|
@ -20,14 +20,17 @@ $contactHelper = $this->getHelper('ContactFlags');
|
||||||
<div style="background-color: lightgray; padding: 0.5em; border-radius: 0.5em; overflow: hidden; margin: 0.125em; float: left;">
|
<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 )) ?>"
|
<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;" />
|
style="width: 60px; border: 4px solid white; border-radius: 8px; margin-right: 8px; float: left;" />
|
||||||
<strong><?= $contact->contact_name ?></strong> (<?= $contact->contact_alias ?>)
|
<a href="<?= $this->href(
|
||||||
|
'monitoring/show/contact',
|
||||||
|
array('contact' => $contact->contact_name)
|
||||||
|
) ?>"><strong><?= $contact->contact_name ?></strong></a> (<?= $contact->contact_alias ?>)
|
||||||
<?php
|
<?php
|
||||||
foreach (array(
|
foreach (array(
|
||||||
$contact->contact_email => 'eMail: <a href="mailto:%1$s">%1$s</a>',
|
'eMail: <a href="mailto:%1$s">%1$s</a>' => $contact->contact_email,
|
||||||
$contact->contact_pager => 'Pager: %s',
|
'Pager: %s' => $contact->contact_pager,
|
||||||
$contact->contact_notify_service_timeperiod => 'Service notification period: %s',
|
'Service notification period: %s' => $contact->contact_notify_service_timeperiod,
|
||||||
$contact->contact_notify_host_timeperiod => 'Host notification period: %s'
|
'Host notification period: %s' => $contact->contact_notify_host_timeperiod
|
||||||
) as $value => $format):
|
) as $format => $value):
|
||||||
if ($value): ?>
|
if ($value): ?>
|
||||||
<br />
|
<br />
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue