parent
1fa550838d
commit
c6c78989a5
|
@ -64,12 +64,15 @@ class Monitoring_CommentController extends Controller
|
|||
*/
|
||||
public function showAction()
|
||||
{
|
||||
$listCommentsLink = Url::fromPath('monitoring/list/comments')
|
||||
->setQueryString('comment_type=(comment|ack)');
|
||||
|
||||
$this->view->comment = $this->comment;
|
||||
if ($this->hasPermission('monitoring/command/comment/delete')) {
|
||||
$this->view->delCommentForm = $this->createDelCommentForm();
|
||||
$this->view->delCommentForm->populate(
|
||||
array(
|
||||
'redirect' => Url::fromPath('monitoring/list/comments'),
|
||||
'redirect' => $listCommentsLink,
|
||||
'comment_id' => $this->comment->id,
|
||||
'comment_is_service' => isset($this->comment->service_description)
|
||||
)
|
||||
|
|
|
@ -81,9 +81,8 @@ class Monitoring_CommentsController extends Controller
|
|||
{
|
||||
$this->assertPermission('monitoring/command/comment/delete');
|
||||
|
||||
$this->view->comments = $this->comments;
|
||||
$this->view->listAllLink = Url::fromPath('monitoring/list/comments')
|
||||
->setQueryString($this->filter->toQueryString());
|
||||
$listCommentsLink = Url::fromPath('monitoring/list/comments')
|
||||
->setQueryString('comment_type=(comment|ack)');
|
||||
$delCommentForm = new DeleteCommentsCommandForm();
|
||||
$delCommentForm->setTitle($this->view->translate('Remove all Comments'));
|
||||
$delCommentForm->addDescription(sprintf(
|
||||
|
@ -91,8 +90,11 @@ class Monitoring_CommentsController extends Controller
|
|||
count($this->comments)
|
||||
));
|
||||
$delCommentForm->setComments($this->comments)
|
||||
->setRedirectUrl(Url::fromPath('monitoring/list/comments'))
|
||||
->setRedirectUrl($listCommentsLink)
|
||||
->handleRequest();
|
||||
$this->view->delCommentForm = $delCommentForm;
|
||||
$this->view->comments = $this->comments;
|
||||
$this->view->listAllLink = Url::fromPath('monitoring/list/comments')
|
||||
->setQueryString($this->filter->toQueryString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue