mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-22 21:34:28 +02:00
Fix the config/resource-action's html markup
This commit is contained in:
parent
9cdd891866
commit
c8d61f78e7
@ -375,13 +375,15 @@ class ConfigController extends BaseConfigController
|
|||||||
$this->render('authentication/remove');
|
$this->render('authentication/remove');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function resourceAction($showOnly = false)
|
/**
|
||||||
|
* Display all available resources and a link to create a new one
|
||||||
|
*/
|
||||||
|
public function resourceAction()
|
||||||
{
|
{
|
||||||
|
$this->view->messageBox = new AlertMessageBox(true);
|
||||||
$this->view->tabs->activate('resources');
|
$this->view->tabs->activate('resources');
|
||||||
|
|
||||||
$this->view->messageBox = new AlertMessageBox(true);
|
|
||||||
$this->view->resources = IcingaConfig::app('resources', true)->toArray();
|
$this->view->resources = IcingaConfig::app('resources', true)->toArray();
|
||||||
$this->render('resource');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createresourceAction()
|
public function createresourceAction()
|
||||||
|
@ -1,30 +1,33 @@
|
|||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?= $this->tabs ?>
|
<?= $tabs; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content" data-base-target="_next">
|
<div class="content" data-base-target="_next">
|
||||||
<?php
|
<?= $messageBox; ?>
|
||||||
|
<p>
|
||||||
if (isset($this->messageBox)) {
|
<a href="<?= $this->href('/config/createresource') ?>">
|
||||||
// TODO: Get rid of messageBoxes in favour of notifications
|
<?= $this->icon('create.png'); ?> <?= $this->translate('Create a new resource'); ?>
|
||||||
echo $this->messageBox->render();
|
</a>
|
||||||
}
|
</p>
|
||||||
|
<table class="action">
|
||||||
?>
|
<thead>
|
||||||
<p><a href="<?= $this->href('/config/createresource') ?>"><?= $this->icon('create.png'); ?> Create A New Resource</a></p>
|
<th><?= $this->translate('Resource'); ?></th>
|
||||||
|
<th style="width: 5em"><?= $this->translate('Remove'); ?></th>
|
||||||
<table class="action">
|
</thead>
|
||||||
<thead>
|
<tbody>
|
||||||
<th>Resource</th>
|
|
||||||
<th style="width: 5em">Remove</th>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php foreach ($this->resources as $name => $resource): ?>
|
<?php foreach ($this->resources as $name => $resource): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="<?= $this->href('config/editresource', array('resource' => $name)) ?>"><?= $this->icon('edit.png') ?> <?= $this->escape($name); ?></td>
|
<td>
|
||||||
<td style="text-align: center"><a href="<?= $this->href('config/removeresource', array('resource' => $name)) ?>"><?= $this->icon('remove.png'); ?></a></td>
|
<a href="<?= $this->href('config/editresource', array('resource' => $name)) ?>">
|
||||||
</tr>
|
<?= $this->icon('edit.png') ?> <?= $this->escape($name); ?>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td style="text-align: center">
|
||||||
|
<a href="<?= $this->href('config/removeresource', array('resource' => $name)) ?>">
|
||||||
|
<?= $this->icon('remove.png'); ?>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user