[CMF-checkins] CVS: Products/CMFDefault/skins/content - content_status_modify.py:1.3
Jens Vagelpohl
jens@zope.com
Wed, 26 Sep 2001 14:16:25 -0400
Update of /cvs-repository/Products/CMFDefault/skins/content
In directory cvs.zope.org:/tmp/cvs-serv23605/CMFDefault/skins/content
Modified Files:
content_status_modify.py
Log Message:
When rejecting an item the reviewer will now be redirected back
to the search page for pending content items.
the redirect back to the content object itself blew up if the reviewer
was just a reviewer but not a manager since plain reviewers are not allowed
to view private content
=== Products/CMFDefault/skins/content/content_status_modify.py 1.2 => 1.3 ===
comment=comment)
-context.REQUEST[ 'RESPONSE' ].redirect( '%s/view?%s'
- % ( context.absolute_url()
- , 'portal_status_message=Status+changed.'
- ) )
+if workflow_action == 'reject':
+ redirect_url = context.portal_url() + '/search?review_state=pending'
+else:
+ redirect_url = '%s/view?%s' % ( context.absolute_url()
+ , 'portal_status_message=Status+changed.'
+ )
+
+context.REQUEST[ 'RESPONSE' ].redirect( redirect_url )