mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 01:04:09 +02:00
parent
4205eb4cc9
commit
cdc3d43a04
@ -2,16 +2,10 @@
|
|||||||
|
|
||||||
use Icinga\Web\Navigation\Navigation;
|
use Icinga\Web\Navigation\Navigation;
|
||||||
|
|
||||||
$navigation = new Navigation();
|
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||||
//$navigation->load($object->getType() . '-note');
|
|
||||||
foreach ($navigation as $item) {
|
|
||||||
$item->setObject($object);
|
|
||||||
}
|
|
||||||
|
|
||||||
$notes = trim($object->getNotes());
|
$navigation = new Navigation();
|
||||||
if ($notes) {
|
$notes = trim($object->notes);
|
||||||
$navigation->addItem($notes);
|
|
||||||
}
|
|
||||||
|
|
||||||
$links = $object->getNotesUrls();
|
$links = $object->getNotesUrls();
|
||||||
if (! empty($links)) {
|
if (! empty($links)) {
|
||||||
@ -35,11 +29,16 @@ if (! empty($links)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($navigation->isEmpty() || !$navigation->hasRenderableItems()) {
|
if (($navigation->isEmpty() || ! $navigation->hasRenderableItems()) && $notes === '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Notes'); ?></th>
|
<th><?= $this->translate('Notes') ?></th>
|
||||||
<?= $navigation->getRenderer()->setElementTag('td')->setCssClass('notes'); ?>
|
<td>
|
||||||
|
<?= $navigation->getRenderer() ?>
|
||||||
|
<?php if ($notes !== ''): ?>
|
||||||
|
<p><?= $this->nl2br($this->escape($notes)) ?></p>
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
Loading…
x
Reference in New Issue
Block a user