[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_edit.py:1.3
Ken Manheimer
klm@zope.com
Thu, 25 Oct 2001 17:55:16 -0400
Update of /cvs-repository/CMF/CMFCollector/skins/collector
In directory cvs.zope.org:/tmp/cvs-serv32361
Modified Files:
collector_edit.py
Log Message:
Service the "reinstate catalog option", and provide feedback in the
message about it.
=== CMF/CMFCollector/skins/collector/collector_edit.py 1.2 => 1.3 ===
##title=Configure Collector
+from Products.PythonScripts.standard import url_quote_plus
+
changed = context.edit(title=title,
description=description,
abbrev=abbrev,
@@ -14,8 +16,16 @@
versions=versions,
other_versions_spiel=other_versions_spiel)
-qst='?portal_status_message=Configuration+%s.' % ((changed and "changed")
- or "unchanged")
+if changed:
+ changes = "Configuration changed"
+else:
+ changes = "No configuration changes"
+
+if context.REQUEST.get('recatalog', None):
+ context.reinstate_catalog()
+ changes = changes + ", reindexed"
+
+msg = '?portal_status_message=%s.' % url_quote_plus(changes)
-context.REQUEST.RESPONSE.redirect(context.absolute_url() + qst )
+context.REQUEST.RESPONSE.redirect(context.absolute_url() + msg)