From: Israel S. P. <svn...@pl...> - 2009-12-24 16:14:43
|
Author: dukebody Date: Thu Dec 24 16:14:29 2009 New Revision: 12016 Modified: Products.Archetypes/trunk/CHANGES.txt Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/go_back.cpy Log: Redirect to abs_url + /view to avoid introducing depedencies with plone.app.layout. Modified: Products.Archetypes/trunk/CHANGES.txt ============================================================================== --- Products.Archetypes/trunk/CHANGES.txt (original) +++ Products.Archetypes/trunk/CHANGES.txt Thu Dec 24 16:14:29 2009 @@ -9,7 +9,7 @@ - Redirect to the object view URL when the user is coming from the edit view of the object and clicks the Cancel button. This closes http://dev.plone.org/plone/ticket/8853 - [dukebody] + [dukebody, thanks hannosch and wichert] - Fixed package dependencies. [hannosch] Modified: Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/go_back.cpy ============================================================================== --- Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/go_back.cpy (original) +++ Products.Archetypes/trunk/Products/Archetypes/skins/archetypes/go_back.cpy Thu Dec 24 16:14:29 2009 @@ -36,8 +36,7 @@ ## default='Add new item operation was cancelled, object was removed.') elif last_referer == '%s/edit' % context.absolute_url(): # coming from the edit page # XXX: This will only work if the edit view is named 'edit' - context_state = context.restrictedTraverse('@@plone_context_state') - redirect_to = context_state.view_url() + redirect_to = '%s/view' % context.absolute_url() message=_(u'message_edit_item_cancelled', default='Edit cancelled.') else: |