NavigationController: Add new parameters to all view script's links

refs #10246
This commit is contained in:
Johannes Meyer 2015-09-29 17:15:57 +02:00
parent 4b76115399
commit 1c44a3306b
3 changed files with 21 additions and 5 deletions

View File

@ -182,7 +182,6 @@ class NavigationController extends Controller
$removeForm = new Form();
$removeForm->setUidDisabled();
$removeForm->setAction(Url::fromPath('navigation/unshare'));
$removeForm->addElement('hidden', 'name', array(
'decorators' => array('ViewHelper')
));

View File

@ -27,7 +27,10 @@
<td><?= $this->qlink(
$name,
'navigation/edit',
array('name' => $name),
array(
'name' => $name,
'type' => $item->type
),
array(
'title' => sprintf($this->translate('Edit navigation item %s'), $name)
)
@ -39,7 +42,10 @@
<td><?= $this->qlink(
'',
'navigation/remove',
array('name' => $name),
array(
'name' => $name,
'type' => $item->type
),
array(
'icon' => 'trash',
'title' => sprintf($this->translate('Remove navigation item %s'), $name)

View File

@ -1,4 +1,8 @@
<?php if (! $this->compact): ?>
<?php
use Icinga\Web\Url;
if (! $this->compact): ?>
<div class="controls">
<?= $this->tabs; ?>
<?= $this->sortBox; ?>
@ -26,6 +30,8 @@
'navigation/edit',
array(
'name' => $name,
'type' => $item->type,
'owner' => $item->owner,
'referrer' => 'shared'
),
array(
@ -48,7 +54,12 @@
)
); ?></td>
<?php else: ?>
<td data-base-target="_self"><?= $removeForm->setDefault('name', $name); ?></td>
<td data-base-target="_self"><?= $removeForm
->setDefault('name', $name)
->setAction(Url::fromPath(
'navigation/unshare',
array('type' => $item->type, 'owner' => $item->owner)
)); ?></td>
<?php endif ?>
</tr>
<?php endforeach ?>