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:
Thomas Gelf 2017-02-16 11:07:23 +01:00
parent 25395656ce
commit 13918f7337
2 changed files with 3 additions and 3 deletions

View File

@ -142,7 +142,9 @@ class HostController extends ObjectController
->setTitle($title)
->setConnection($db);
$tables[$title] = $table;
if (count($table)) {
$tables[$title] = $table;
}
$this->view->tables = $tables;
}

View File

@ -10,8 +10,6 @@
<div class="content">
<?= $this->form ?>
<?php foreach ($this->tables as $key => $table): ?>
<?php if (count($table)): ?>
<?= $table->render() ?>
<?php endif ?>
<?php endforeach ?>
</div>