Remove comment lists from multi-select views.

refs #8565
This commit is contained in:
Matthias Jentsch 2015-04-02 16:51:09 +02:00
parent 45a0982beb
commit 6c0f9cf6f5
3 changed files with 1 additions and 68 deletions

View File

@ -171,8 +171,7 @@ class Monitoring_HostsController extends Controller
$this->view->objectsInDowntime = $objectsInDowntime;
$this->view->inDowntimeLink = Url::fromPath('monitoring/list/downtimes')
->setQueryString(Filter::matchAny($downtimeFilterExpressions)->toQueryString());
$this->view->commentsLink = Url::fromRequest()
->setPath('monitoring/list/comments');
$this->view->commentsLink = Url::fromRequest()->setPath('monitoring/list/comments');
}
/**

View File

@ -1,7 +1,3 @@
<?php
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
?>
<div class="controls">
<?php if (! $this->compact): ?>
@ -183,35 +179,6 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
</p>
<table>
<?php foreach ($objects as $service): ?>
<?php $service->fetchComments(); ?>
<?php foreach ($service->comments as $comment): ?>
<tr>
<td style="vertical-align: top;" data-base-target="_self">
<?php
$delCommentForm = new DeleteCommentCommandForm();
$delCommentForm->populate(
array('comment_id' => $comment->id, 'redirect' => html_entity_decode($this->url))
);
$delCommentForm->setAction(
$this->url(
'monitoring/host/delete-comment',
array('host' => $service->getName())
)
);
echo $delCommentForm;
?>
(<?= ucfirst($comment->type) ?>):
</td>
<td style="padding-left: .5em;">
<?= nl2br($comment->comment) ?>
</td>
</tr>
<?php endforeach ?>
<?php endforeach ?>
</table>
<!--
<p>
<div><?= $this->qlink(

View File

@ -1,7 +1,3 @@
<?php
use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
?>
<div class="controls">
<?php if (! $this->compact): ?>
@ -175,35 +171,6 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
); ?>
<p>
<table>
<?php foreach ($objects as $service): ?>
<?php $service->fetchComments(); ?>
<?php foreach ($service->comments as $comment): ?>
<tr>
<td style="vertical-align: top;" data-base-target="_self">
<?php
$delCommentForm = new DeleteCommentCommandForm();
$delCommentForm->populate(
array('comment_id' => $comment->id, 'redirect' => html_entity_decode($this->url))
);
$delCommentForm->setAction(
$this->url(
'monitoring/service/delete-comment',
array('host' => $service->getHost()->getName(), 'service' => $service->getName())
)
);
echo $delCommentForm;
?>
(<?= ucfirst($comment->type) ?>):
</td>
<td style="padding-left: .5em;">
<?= nl2br($comment->comment) ?>
</td>
</tr>
<?php endforeach ?>
<?php endforeach ?>
</table>
<!--
</p>
<div><?= $this->qlink(