Restyle resources config

This commit is contained in:
Thomas Gelf 2014-03-08 13:26:05 +01:00
parent 5c27f8153a
commit 4fef863674

View File

@ -1,37 +1,30 @@
<?php
use Icinga\Web\Url;
$createResource = $this->href('/config/createresource');
?>
<div class="controls"> <div class="controls">
<?= $this->tabs->render($this); ?> <?= $this->tabs ?>
</div> </div>
<div class="content"> <div class="content" data-base-target="col2">
<?php if (isset($this->messageBox)): ?> <?php
<?= $this->messageBox->render() ?>
<?php endif ?>
<h1>Create Resource</h1> if (isset($this->messageBox)) {
<p><a href="<?= $createResource ?>"><?= $this->icon('create.png'); ?> Create A New Resource</a></p> // TODO: Get rid of messageBoxes in favour of notifications
echo $this->messageBox->render();
}
<table class="configTable"> ?>
<?php foreach ($this->resources as $name => $resource): ?> <p><a href="<?= $this->href('/config/createresource') ?>"><?= $this->icon('create.png'); ?> Create A New Resource</a></p>
<tr>
<td class="configTable"> <table class="action">
<div> <thead>
<b>Resource:</b>&ensp;<?= $this->escape($name); ?> <th>Resource</th>
</div> <th style="width: 5em">Remove</th>
<div> </thead>
<a href="<?= $this->href('config/editresource', array('resource' => $name));?>"> <tbody>
<?= $this->icon('edit.png'); ?> Edit</a>&emsp; <?php foreach ($this->resources as $name => $resource): ?>
<?php if (count($this->resources) > 1): ?> <tr>
<a href="<?= $this->href('config/removeresource', array('resource' => $name));?>"> <td><a href="<?= $this->href('config/editresource', array('resource' => $name)) ?>"><?= $this->icon('edit.png') ?> <?= $this->escape($name); ?></td>
<?= $this->icon('remove.png'); ?> Remove</a>&emsp; <td style="text-align: center"><a href="<?= $this->href('config/removeresource', array('resource' => $name)) ?>"><?= $this->icon('remove.png'); ?></a></td>
<?php endif; ?> </tr>
</div> <?php endforeach; ?>
</td> </table>
</tr>
<?php endforeach; ?>
</table>
</div> </div>