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