NavigationController: Redirect to the shared overview if its the referrer..

..when editing a navigation item.

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-23 14:21:04 +02:00
parent 6aecfe6959
commit 4d303e7121
2 changed files with 6 additions and 2 deletions

View File

@ -188,9 +188,10 @@ class NavigationController extends Controller
public function editAction()
{
$itemName = $this->params->getRequired('name');
$referrer = $this->params->get('referrer', 'index');
$form = new NavigationConfigForm();
$form->setRedirectUrl('navigation');
$form->setRedirectUrl($referrer === 'shared' ? 'navigation/shared' : 'navigation');
$form->setItemTypes($this->listItemTypes());
$form->setTitle(sprintf($this->translate('Edit Navigation Item %s'), $itemName));
$form->setUser($this->Auth()->getUser());

View File

@ -24,7 +24,10 @@
<td><?= $this->qlink(
$name,
'navigation/edit',
array('name' => $name),
array(
'name' => $name,
'referrer' => 'shared'
),
array(
'title' => sprintf($this->translate('Edit shared navigation item %s'), $name)
)