Skip to content
Snippets Groups Projects
Unverified Commit e49e5547 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2945243 by Lendude, msankhala, Nick Hope, dww: Remain on a View page after saving it

parent c72abf07
No related branches found
No related tags found
No related merge requests found
......@@ -161,6 +161,8 @@ public function buildHeader() {
*/
public function getDefaultOperations(EntityInterface $entity) {
$operations = parent::getDefaultOperations($entity);
// Remove destination redirect for Edit operation.
$operations['edit']['url'] = $entity->toUrl('edit-form');
if ($entity->hasLinkTemplate('duplicate-form')) {
$operations['duplicate'] = [
......
......@@ -52,6 +52,13 @@ public function testViewsListLimit() {
$this->assertResponse(200);
$this->assertLink(t('Add view'));
// Check that there is a link to the content view without a destination
// parameter.
$this->drupalGet('admin/structure/views');
$links = $this->getSession()->getPage()->findAll('xpath', "//a[contains(@href, 'admin/structure/views/view/content')]");
$this->assertStringEndsWith('admin/structure/views/view/content', $links[0]->getAttribute('href'));
$this->assertLinkByHref('admin/structure/views/view/content/delete?destination');
// Count default views to be subtracted from the limit.
$views = count(Views::getEnabledViews());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment