I think it's good if we redirecting the user back to the admin overview page after adding/editing an entity. Since they're done adding/editing anyway, they won't need to see the form again. This would be consistent with how node add/edit form works :)

CommentFileSizeAuthor
eck-redirect_after_add_edit.patch2.81 KBedmund.kwok

Comments

fmizzell’s picture

This was my first idea when I first wrote eck, but after a little bit more discussion and development, I realized that it is not as simple as it seems. ECK currently gives you 4 urls to deal with your entities: admin overview, edit, delete, and view. The admin overview, edit, and delete, are bundled together, so it would make sense to to go back to the admin overview after editing, or deleting an entity. But lets say that we want an edit tab on the view page so we can easily edit our entities as we are viewing them. The logical place to go back after editing an entity there would be to the view, not to the admin overview, as that user might not even have permission to access that. So as we can see we have different clusters of administration that should each act independently. If you are interested in this stuff #1373466: Flexibility to change url paths (page manager integration) is trying to solve this overall problem.

@edmund.kwok: thanks for the patch, people that need this functionality for ECK, as it stands now, should find it useful. Let's see if other people want this functionality submitted, otherwise I am tempted to just wait until the before mentioned issue solves the problem.

edmund.kwok’s picture

The patch already takes this into consideration. My local copy has the code with tabs (View, Edit, Delete) in the entity view page - which is just uncommenting the existing code. So edits from the entity view page will return to the view page, while edits from the administrator overview pages, will return to the administrator overview pages.

I'll have a look at the other issue and see if I can chime in :)

fmizzell’s picture

Status: Needs review » Closed (fixed)

Well, I checked out the patch.. It definitely improves the UX, so I decided to go ahead and commit it.. thanks.

replicaobscura’s picture

Version: 7.x-2.x-dev » 7.x-2.0-beta1
Status: Closed (fixed) » Needs review

With 7.x-2.0-beta1, I'm still just going to the Entity View page after I edit an entity. I'd like to return to the view page that the Edit link was clicked from--isn't that what this patch was supposed to accomplish?

Jorrit’s picture

Followers of this issue may be interested in the the following issue and patch that I created:

#1831590: Add destination parameter to views edit/delete links

fmizzell’s picture

Status: Needs review » Fixed

at some point through all the stuff we have committed, this got added.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 811a422 on 7.x-2.x, change_paths, own_permissions, 7.x-2.x-property-widgets, 7.x-3.x, entity_reference, 7.x-3.x-settings, 7.x-2.0.x, 7.x-2.1.x authored by edmund.kwok, committed by fmizzell:
    #1427980 Redirect back to previous destination after add/edit
    
    

  • Commit 811a422 on 7.x-2.x, change_paths, own_permissions, 7.x-2.x-property-widgets, 7.x-3.x, entity_reference, 7.x-3.x-settings, 7.x-2.0.x, 7.x-2.1.x authored by edmund.kwok, committed by fmizzell:
    #1427980 Redirect back to previous destination after add/edit
    
    

  • Commit 811a422 on 7.x-2.x, 7.x-3.x, 8.x authored by edmund.kwok, committed by fmizzell:
    #1427980 Redirect back to previous destination after add/edit
    
    

  • Commit 811a422 on 7.x-2.x, 7.x-3.x, 8.x authored by edmund.kwok, committed by fmizzell:
    #1427980 Redirect back to previous destination after add/edit