Last change
on this file since 1180 was
681,
checked in by Henrik Bettermann, 18 years ago
|
academics_contents no longer used
|
-
Property svn:keywords set to
Id
|
File size:
835 bytes
|
Rev | Line | |
---|
[370] | 1 | ##parameters= |
---|
[486] | 2 | # $Id: id_rename.py 681 2006-10-13 06:43:39Z henrik $ |
---|
[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() + \ |
---|
[681] | 13 | ('/academics_index?portal_status_message=%s' \ |
---|
[371] | 14 | % ('Courses cannot be renamed',))) |
---|
[681] | 15 | |
---|
[370] | 16 | new_ids = REQUEST['new_ids'] |
---|
| 17 | new_ids = [id.upper() for id in REQUEST['new_ids']] |
---|
| 18 | |
---|
[586] | 19 | here = context |
---|
| 20 | if context.portal_type == "University": |
---|
| 21 | here = context.academics |
---|
[370] | 22 | |
---|
[586] | 23 | |
---|
[681] | 24 | here.manage_renameObjects(REQUEST['ids'], new_ids, REQUEST) |
---|
| 25 | |
---|
[586] | 26 | return REQUEST.RESPONSE.redirect(here.absolute_url() + \ |
---|
| 27 | ('/academics_index?portal_status_message=%s' \ |
---|
[370] | 28 | % ('psm_item(s)_renamed',))) |
---|
Note: See
TracBrowser for help on using the repository browser.