mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
host/services: do not show tables based on...
...whether they have content or not. It's too late to take this decision in the view, as different tables are to be handled differently - in the controlller. fixes #793
This commit is contained in:
parent
25395656ce
commit
13918f7337
@ -142,7 +142,9 @@ class HostController extends ObjectController
|
|||||||
->setTitle($title)
|
->setTitle($title)
|
||||||
->setConnection($db);
|
->setConnection($db);
|
||||||
|
|
||||||
$tables[$title] = $table;
|
if (count($table)) {
|
||||||
|
$tables[$title] = $table;
|
||||||
|
}
|
||||||
|
|
||||||
$this->view->tables = $tables;
|
$this->view->tables = $tables;
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<?= $this->form ?>
|
<?= $this->form ?>
|
||||||
<?php foreach ($this->tables as $key => $table): ?>
|
<?php foreach ($this->tables as $key => $table): ?>
|
||||||
<?php if (count($table)): ?>
|
|
||||||
<?= $table->render() ?>
|
<?= $table->render() ?>
|
||||||
<?php endif ?>
|
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user