getHelper('CommandForm'); $data = array('host' => $object->host_name); if ($object->service_description) { $data['service'] = $object->service_description; } $list = array(); foreach ($object->comments as $comment) { // Ticket hook sample $text = $this->tickets ? preg_replace_callback( $this->tickets->getPattern(), array($this->tickets, 'createLink'), $this->escape($comment->comment) ) : $this->escape($comment->comment); $deleteData = $data; $deleteData['commentid'] = $comment->id; // $iconForm = $cf->iconSubmitForm( // 'img/icons/remove_petrol.png', $iconForm = $cf->labelSubmitForm( 'X', 'Remove comment', 'link-like', 'removecomment', $deleteData ); $list[] = sprintf( '%s (%s)
%s (%s):%s
', $this->escape($comment->author), $this->timeSince($comment->timestamp), $iconForm, ucfirst($comment->type), str_replace(array('\r\n', '\n'), '
', $text) ); } ?> translate('Comments') ?> icon('comment_petrol.png') ?> translate('Add comment') ?>