GroupController: Behave nicely when not any backend is available

This commit is contained in:
Johannes Meyer 2015-06-08 13:28:12 +02:00
parent 07041fafc8
commit 91cee3a957
2 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,10 @@ class GroupController extends AuthBackendController
function ($b) { return $b->getName(); },
$this->loadUserGroupBackends('Icinga\Data\Selectable')
);
if (empty($backendNames)) {
return;
}
$this->view->backendSelection = new Form();
$this->view->backendSelection->setAttrib('class', 'backend-selection');
$this->view->backendSelection->setUidDisabled();

View File

@ -18,7 +18,7 @@ if (! $this->compact): ?>
<div class="content groups">
<?php
if ($backend === null) {
if (! isset($backend)) {
echo $this->translate('No backend found which is able to list groups') . '</div>';
return;
} else {