summaryrefslogtreecommitdiffstats
path: root/modules/monitoring/application/views/scripts/show/contact.phtml
blob: b0fce72f5360871b950804b0aed8c40a289fc443 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php $contactHelper = $this->getHelper('ContactFlags') ?>
<div class="controls">
 <?php if (! $this->compact): ?>
  <?= $this->tabs; ?>
 <?php endif ?>
  <h1><?= $this->translate('Contact details') ?></h1>

<?php if (! $contact): ?>
  <?= $this->translate('No such contact') ?>: <?= $contactName ?>
</div>
<?php return; endif ?>

  <table class="name-value-table">
    <tbody>
      <tr>
        <th></th>
        <td><strong><?= $this->escape($contact->contact_alias) ?></strong> (<?= $contact->contact_name ?>)</td>
      </tr>
<?php if ($contact->contact_email): ?>
      <tr>
        <th><?= $this->translate('Email') ?></th>
        <td>
            <a href="mailto:<?= $contact->contact_email; ?>" title="<?= sprintf($this->translate('Send a mail to %s'), $contact->contact_alias); ?>" aria-label="<?= sprintf($this->translate('Send a mail to %s'), $contact->contact_alias); ?>">
                <?= $this->escape($contact->contact_email); ?>
            </a>
        </td>
      </tr>
<?php endif ?>
<?php if ($contact->contact_pager): ?>
      <tr>
        <th><?= $this->translate('Pager') ?></th>
        <td><?= $this->escape($contact->contact_pager) ?></td>
      </tr>
<?php endif ?>
      <tr>
        <th><?= $this->translate('Hosts') ?></th>
        <td><?= $this->escape($contactHelper->contactFlags($contact, 'host')) ?><br />
        <?= $this->escape($contact->contact_notify_host_timeperiod) ?></td>
      </tr>
      <tr>
        <th><?= $this->translate('Services') ?></th>
        <td><?= $this->escape($contactHelper->contactFlags($contact, 'service')) ?><br />
        <?= $this->escape($contact->contact_notify_service_timeperiod) ?></td>
      </tr>
    </tbody>
  </table>
  <?php if (count($commands)): ?>
  <h1><?= $this->translate('Commands') ?>:</h1>
  <ul>
  <?php foreach ($commands as $command): ?>
    <li><?= $command->command_name ?></li>
  <?php endforeach ?>
  </ul>
  <?php endif ?>
  <h1><?= $this->translate('Notifications sent to this contact') ?></h1>
  <?= $this->limiter; ?>
  <?= $this->paginator; ?>
</div>

<?php if (count($notifications)): ?>
<?= $this->partial('list/notifications.phtml', array(
    'notifications' => $notifications,
    'compact' => true
)); ?>
<?php else: ?>
<div class="content"><?= $this->translate('No notifications have been sent for this contact') ?></div>
<?php endif ?>