Add note to login page when the configuration directory is missing

refs #7163
refs #7409
This commit is contained in:
Johannes Meyer 2014-10-21 16:11:49 +02:00
parent a5b10235d2
commit b4a69792d8
3 changed files with 23 additions and 0 deletions

View File

@ -145,6 +145,8 @@ class AuthenticationController extends ActionController
} catch (Exception $e) {
$this->view->errorInfo = $e->getMessage();
}
$this->view->configMissing = count($config->toArray()) === 0 && false === is_dir(Config::$configDir);
}
/**

View File

@ -15,5 +15,17 @@
<?php endif ?>
<?= $this->form ?>
<div class="footer">Icinga Web 2 &copy; 2013-2014 Icinga Team</div>
<?php if ($configMissing): ?>
<div class="config-note"><?= sprintf(
t(
'You seem not to have Icinga Web 2 configured yet so it\'s not possible to log in without any defined '
. 'authentication method. Please define a authentication method by following the instructions in the'
. ' %1$sdocumentation%3$s or by using our %2$sweb-based installer%3$s.'
),
'<a href="' . 'documention-link-here' . '" title="Icinga Web 2 Documentation">', // TODO: Documentation link
'<a href="' . $this->href('setup') . '" title="Icinga Web 2 Installer">',
'</a>'
); ?></div>
<?php endif ?>
</div>
</div>

View File

@ -100,4 +100,13 @@
text-align: center;
}
div.config-note {
width: 50%;
padding: 1em;
margin: 5em auto 0;
text-align: center;
border-radius: 0.5em;
border: 2px solid coral;
background-color: beige;
}
}