From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- .../scripts/partials/comment/comment-detail.phtml | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml (limited to 'modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml') diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml new file mode 100644 index 0000000..c603d3c --- /dev/null +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -0,0 +1,82 @@ +
+objecttype === 'service') { + echo ''; + echo sprintf( + $this->translate('%s on %s', 'service on host'), + $this->qlink( + $comment->service_display_name, + 'monitoring/service/show', + [ + 'host' => $comment->host_name, + 'service' => $comment->service_description + ], + [ + 'title' => sprintf( + $this->translate('Show detailed information for service %s on host %s'), + $comment->service_display_name, + $comment->host_display_name + ) + ] + ), + $this->qlink( + $comment->host_display_name, + 'monitoring/host/show', + ['host' => $comment->host_name], + [ + 'title' => sprintf( + $this->translate('Show detailed information for host %s'), + $comment->host_display_name + ) + ] + ) + ); + echo ''; +} else { + echo $this->qlink( + $comment->host_display_name, + 'monitoring/host/show', + array('host' => $comment->host_name), + array( + 'title' => sprintf( + $this->translate('Show detailed information for this comment about host %s'), + $comment->host_display_name + ) + ) + ); +} ?> + + translate('by') ?> + escape($comment->author) ?> + timeAgo($comment->timestamp) ?> + + + persistent ? $this->icon('attach', 'This comment is persistent') : '' ?> + expiration ? $this->icon('clock', sprintf( + $this->translate('This comment expires on %s at %s'), + $this->formatDate($comment->expiration), + $this->formatTime($comment->expiration) + )) : '' ?> + setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action dont-print'); + $deleteButton->populate( + array( + 'comment_id' => $comment->id, + 'comment_is_service' => isset($comment->service_description), + 'comment_name' => $comment->name + ) + ); + $deleteButton->getElement('btn_submit') + ->setAttrib('aria-label', $this->translate('Delete comment')) + ->setAttrib('id', $buttonId) + ->setAttrib('aria-describedby', $buttonId . ' ' . $textId); + echo $deleteButton; + } ?> + +
+nl2br($this->markdownLine($comment->comment, isset($textId) ? ['id' => $textId, 'class' => 'caption'] : [ 'class' => 'caption'])) ?> -- cgit v1.2.3