Restyle auth backend config

This commit is contained in:
Thomas Gelf 2014-03-08 13:35:07 +01:00
parent 4fef863674
commit 0dc5a12565

View File

@ -1,42 +1,43 @@
<?php
use Icinga\Web\Url;
$createLdapBackend = $this->href('/config/createAuthenticationBackend', array('type' => 'ldap'));
$createDbBackend = $this->href('/config/createAuthenticationBackend', array('type' => 'db'));
?>
<div class="controls"> <div class="controls">
<?= $this->tabs->render($this); ?> <?= $this->tabs ?>
</div> </div>
<div class="content"> <div class="content">
<?php if (isset($this->messageBox)): ?> <?php
<?= $this->messageBox->render() ?>
<?php endif ?> if (isset($this->messageBox)) {
// TODO: Get rid of such boxes -> notifications?
echo $this->messageBox->render();
}
?>
<h1>Create Authentication Provider</h1>
<p> <p>
<a href="<?= $createLdapBackend ?>"><?= $this->icon('create.png'); ?> Create A New LDAP Authentication Backend</a> <a href="<?= $this->href('/config/createAuthenticationBackend', array('type' => 'ldap')) ?>"><?= $this->icon('create.png'); ?> Create A New LDAP Authentication Backend</a>
<br /> <br />
<a href="<?= $createDbBackend ?>"><?= $this->icon('create.png'); ?> Create A New DB Authentication Backend</a> <a href="<?= $this->href('/config/createAuthenticationBackend', array('type' => 'db')) ?>"><?= $this->icon('create.png'); ?> Create A New DB Authentication Backend</a>
</p> </p>
<table class="configTable"> <table class="action">
<thead>
<th>Resource</th>
<th style="width: 5em">Remove</th>
<th style="width: 5em">Order</th>
</thead>
<tbody>
<?php foreach ($this->backends as $backend): ?> <?php foreach ($this->backends as $backend): ?>
<tr> <tr>
<td class="configTable"> <td class="action">
<div> <a href="<?= $this->href('config/editAuthenticationBackend', array('auth_backend' => $backend->name)) ?>">
<b>Backend:</b>&ensp;<?= $this->escape($backend->name); ?> <?= $this->icon('edit.png') ?> <?= $this->escape($backend->name); ?>
</div> </a>
<div class="config-form-buttons"> </td>
<div class="config-form-group"> <td>
<a href="<?= $this->href('config/removeAuthenticationBackend', array('auth_backend' => $backend->name)) ?>">
<?= $this->icon('remove.png', 'Remove') ?>
</a>
</td>
<td>
<?= $backend->reorderForm; ?> <?= $backend->reorderForm; ?>
</div>
<a href="<?= $this->href('config/editAuthenticationBackend', array('auth_backend' => $backend->name));?>">
<?= $this->icon('edit.png'); ?> Edit</a>&emsp;
<?php if (count($this->backends) > 1): ?>
<a href="<?= $this->href('config/removeAuthenticationBackend', array('auth_backend' => $backend->name));?>">
<?= $this->icon('remove.png'); ?> Remove</a>&emsp;
<?php endif; ?>
</div>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>