Last change
on this file since 2097 was
573,
checked in by joachim, 18 years ago
|
fixed button functions, level_index_view
|
-
Property svn:keywords set to
Id
|
File size:
730 bytes
|
Rev | Line | |
---|
[318] | 1 | ## Script (Python) "folder_delete" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
| 7 | ##parameters=ids=[], REQUEST=None |
---|
| 8 | ##title= |
---|
| 9 | ## |
---|
[486] | 10 | # $Id: retract_checked.py 573 2006-09-27 21:45:50Z joachim $ |
---|
[318] | 11 | """ |
---|
| 12 | FIXME: add docstring. |
---|
| 13 | """ |
---|
| 14 | |
---|
[573] | 15 | ret_url = context.absolute_url() + '/academics_index' |
---|
[318] | 16 | |
---|
| 17 | if ids: |
---|
| 18 | for id in ids: |
---|
| 19 | ob = getattr(context, id) |
---|
| 20 | if context.portal_workflow.getInfoFor(ob,'review_state',None) == "checked": |
---|
| 21 | ob.content_status_modify(workflow_action="retract") |
---|
| 22 | message = 'portal_status_message=workflow status changed' |
---|
| 23 | else: |
---|
| 24 | message = 'portal_status_message=psm_select_at_least_one_document' |
---|
| 25 | |
---|
| 26 | if REQUEST is not None: |
---|
| 27 | return REQUEST.RESPONSE.redirect(ret_url + '?' + message) |
---|
Note: See
TracBrowser for help on using the repository browser.