Last change
on this file since 584 was
486,
checked in by joachim, 18 years ago
|
svn -R propset svn:keywords "Id" .
added layout_application_/edit/create/view
and cleaned that up.
|
-
Property svn:keywords set to
Id
|
File size:
766 bytes
|
Rev | Line | |
---|
[370] | 1 | ##parameters= |
---|
[486] | 2 | # $Id: id_rename.py 486 2006-09-06 10:09:39Z joachim $ |
---|
[370] | 3 | """ |
---|
| 4 | Rename objects which ids are passed in the request. |
---|
| 5 | |
---|
| 6 | Used within the folder_contents template. |
---|
| 7 | """ |
---|
| 8 | |
---|
| 9 | REQUEST = context.REQUEST |
---|
| 10 | |
---|
[371] | 11 | if context.portal_type in ('CoursesFolder',): |
---|
| 12 | return REQUEST.RESPONSE.redirect(context.absolute_url() + \ |
---|
| 13 | ('/academics_contents?portal_status_message=%s' \ |
---|
| 14 | % ('Courses cannot be renamed',))) |
---|
| 15 | |
---|
[370] | 16 | new_ids = REQUEST['new_ids'] |
---|
| 17 | new_ids = [id.upper() for id in REQUEST['new_ids']] |
---|
| 18 | |
---|
| 19 | context.manage_renameObjects(REQUEST['ids'], new_ids, REQUEST) |
---|
| 20 | |
---|
| 21 | return REQUEST.RESPONSE.redirect(context.absolute_url() + \ |
---|
| 22 | ('/academics_contents?portal_status_message=%s' \ |
---|
| 23 | % ('psm_item(s)_renamed',))) |
---|
Note: See
TracBrowser for help on using the repository browser.