Issue #2945243 by Lendude, msankhala, Nick Hope, dww: Remain on a View page after saving it
parent
c72abf07aa
commit
e49e554766
|
@ -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'] = [
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue