monitoring: Fix comment-detail markup

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-30 16:39:24 +02:00
parent 05f14a4f97
commit adbc6ee852
1 changed files with 46 additions and 53 deletions

View File

@ -1,59 +1,52 @@
<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 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
)
); ?>
<?php else: ?>
<?= $this->icon('host', $this->translate('Host')); ?> <?= $this->qlink(
$this->escape($comment->host_display_name),
'monitoring/comment/show',
array('comment_id' => $comment->id),
)
) ?>
<?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(
'title' => sprintf(
$this->translate('Show detailed information for this comment about host %s'),
$comment->host_display_name
),
'class' => 'rowaction'
'comment_id' => $comment->id,
'comment_is_service' => isset($comment->service_description)
)
); ?>
<?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>
);
echo $delCommentForm;
} ?>
</span>
</span>
<br>
<span class="comment-content">
<p class="comment-text">
<?= $this->escape($comment->comment) ?>
</span>
</p>