[CMF-checkins] CVS: CMF/CMFDefault/skins/zpt_generic - rejectItems.py:1.2

Tres Seaver tseaver@zope.com
Tue, 23 Jul 2002 15:29:56 -0400


Update of /cvs-repository/CMF/CMFDefault/skins/zpt_generic
In directory cvs.zope.org:/tmp/cvs-serv11153/CMFDefault/skins/zpt_generic

Added Files:
	rejectItems.py 
Log Message:
 - Merge new review skin.

=== CMF/CMFDefault/skins/zpt_generic/rejectItems.py 1.1 => 1.2 ===
+## Script (Python) "rejectItems"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=items, comment=''
+##title=
+##
+wf_tool = context.portal_workflow # XXX getToolByName
+for path in items:
+    object = context.restrictedTraverse( path )
+    wf_tool.doActionFor( object, 'reject', comment=comment )
+
+context.REQUEST[ 'RESPONSE' ].redirect( '%s/review?%s'
+                   % ( context.portal_url()
+                     , 'portal_status_message=Items+rejected.'
+                     ) )