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

merge-requests/2419/head
Alex Pott 2019-12-05 11:02:58 +00:00
parent c72abf07aa
commit e49e554766
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
2 changed files with 9 additions and 0 deletions

View File

@ -161,6 +161,8 @@ class ViewListBuilder extends ConfigEntityListBuilder {
*/
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'] = [

View File

@ -52,6 +52,13 @@ class ViewsListTest extends UITestBase {
$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());