From 24d43899a7025e5c1cd2e1b0c7bb7ee7669d2440 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Fri, 20 Nov 2015 15:18:29 +0100 Subject: [PATCH] monitoring: Use View::nl2br() and new comment-list style in the comment overview refs #10603 --- .../partials/comment/comment-detail.phtml | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml index 2d4f32792..433b60412 100644 --- a/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml +++ b/modules/monitoring/application/views/scripts/partials/comment/comment-detail.phtml @@ -1,10 +1,11 @@ -
-objecttype === 'service'): ?> - icon('service', $this->translate('Service')) ?> qlink( +
+objecttype === 'service') { + echo $this->icon('service', $this->translate('Service')); + echo $this->qlink( $comment->host_display_name . ': ' . $comment->service_display_name, 'monitoring/service/show', array( - 'host' => $comment->host_name, + 'host' => $comment->host_name, 'service' => $comment->service_description ), array( @@ -14,9 +15,10 @@ $comment->host_display_name ) ) - ) ?> - - icon('host', $this->translate('Host')) ?> qlink( + ); +} else { + echo $this->icon('host', $this->translate('Host')); + echo $this->qlink( $comment->host_display_name, 'monitoring/host/show', array('host' => $comment->host_name), @@ -26,33 +28,33 @@ $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 %s.'), - $this->timeUntil($comment->expiration) - )) : '' ?> - setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action'); - $deleteButton->populate( - array( - 'comment_id' => $comment->id, - 'comment_is_service' => isset($comment->service_description) - ) - ); - echo $deleteButton; - } ?> - + + + persistent ? $this->icon('attach', 'This comment is persistent.') : '' ?> + expiration ? $this->icon('clock', sprintf( + $this->translate('This comment expires %s.'), + $this->timeUntil($comment->expiration) + )) : '' ?> + setAttrib('class', $deleteButton->getAttrib('class') . ' remove-action'); + $deleteButton->populate( + array( + 'comment_id' => $comment->id, + 'comment_is_service' => isset($comment->service_description) + ) + ); + echo $deleteButton; + } ?>

- escape($comment->comment) ?> + nl2br($this->escape($comment->comment)) ?>