[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_issue_followup.py:1.4

Ken Manheimer klm@zope.com
Wed, 24 Oct 2001 16:36:09 -0400


Update of /cvs-repository/CMF/CMFCollector/skins/collector
In directory cvs.zope.org:/tmp/cvs-serv4262

Modified Files:
	collector_issue_followup.py 
Log Message:
When completing issues, return to the default browse view instead of
the issue - and return to the browse starting after the completed
issue (or the beginning, if there are no more).


=== CMF/CMFCollector/skins/collector/collector_issue_followup.py 1.3 => 1.4 ===
                   filetype=(REQUEST.get('filetype', 'file')))
 
-context.REQUEST.RESPONSE.redirect(context.absolute_url())
+if context.status() in ['Resolved', 'Rejected', 'Deferred']:
+    collector = context.aq_parent
+    destination = collector.absolute_url()
+    if len(collector) > int(context.id):
+        destination = destination + "?b_start:int=%s" % int(context.id)
+else:
+    destination = context.absolute_url()
+
+context.REQUEST.RESPONSE.redirect(destination)