Add tab for new resource

refs #5543
This commit is contained in:
Eric Lippmann 2015-10-01 00:10:53 +02:00
parent c2b707697c
commit b15b04257b
2 changed files with 7 additions and 4 deletions

View File

@ -349,8 +349,11 @@ class ConfigController extends Controller
public function createresourceAction()
{
$this->assertPermission('config/application/resources');
$this->getTabs()->add('resources/new', array(
'label' => $this->translate('New Resource'),
'url' => Url::fromRequest()
))->activate('resources/new');
$form = new ResourceConfigForm();
$form->setTitle($this->translate('Create A New Resource'));
$form->addDescription($this->translate('Resources are entities that provide data to Icinga Web 2.'));
$form->setIniConfig(Config::app('resources'));
$form->setRedirectUrl('config/resource');

View File

@ -1,6 +1,6 @@
<div class="controls">
<?= $this->tabs->showOnlyCloseButton() ?>
<?= $tabs ?>
</div>
<div class="content">
<?= $form; ?>
</div>
<?= $form ?>
</div>