-
Notifications
You must be signed in to change notification settings - Fork 275
/
comment-detail.phtml
53 lines (53 loc) · 2.01 KB
/
comment-detail.phtml
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
<span class="comment-header">
<?php if ($comment->objecttype === 'service'): ?>
<?= $this->icon('service', $this->translate('Service')) ?> <?= $this->qlink(
$this->escape($comment->host_display_name) . ': ' . $this->escape($comment->service_display_name),
'monitoring/comment/show',
array('comment_id' => $comment->id),
array(
'title' => sprintf(
$this->translate('Show detailed information for this comment about service %s on host %s'),
$comment->service_display_name,
$comment->host_display_name
),
'class' => 'rowaction'
)
) ?>
<?php else: ?>
<?= $this->icon('host', $this->translate('Host')) ?> <?= $this->qlink(
$this->escape($comment->host_display_name),
'monitoring/comment/show',
array('comment_id' => $comment->id),
array(
'title' => sprintf(
$this->translate('Show detailed information for this comment about host %s'),
$comment->host_display_name
),
'class' => 'rowaction'
)
) ?>
<?php endif ?>
<?= $this->translate('by') ?>
<?= $this->escape($comment->author) ?>
<?= $this->timeAgo($comment->timestamp) ?>
<span class="pull-right" data-base-target="_self">
<?= $comment->persistent ? $this->icon('attach', 'This comment is persistent.') : '' ?>
<?= $comment->expiration ? $this->icon('clock', sprintf(
$this->translate('This comment expires %s.'),
$this->timeUntil($comment->expiration)
)) : '' ?>
<?php if (isset($delCommentForm)) {
$delCommentForm = clone $delCommentForm;
$delCommentForm->populate(
array(
'comment_id' => $comment->id,
'comment_is_service' => isset($comment->service_description)
)
);
echo $delCommentForm;
} ?>
</span>
</span>
<p class="comment-text">
<?= $this->escape($comment->comment) ?>
</p>