Last change
on this file since 1593 was
1447,
checked in by joachim, 18 years ago
|
new function fixReservedBeds:
walks through all reserved beds
if the bed is allocated to a student:
if the student has an accommodation object:
if not the same as the reserved bed:
deallocate bed.
|
-
Property svn:keywords set to
Id
|
File size:
981 bytes
|
Rev | Line | |
---|
[845] | 1 | ## Script (Python) "getAccoFolderInfo" |
---|
[622] | 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
| 7 | ##parameters=student=None |
---|
| 8 | ##title= |
---|
| 9 | ## |
---|
[805] | 10 | # $Id: getAccoFolderInfo.py 1447 2007-02-20 13:41:26Z joachim $ |
---|
[622] | 11 | """ |
---|
[1447] | 12 | return Info about the Accommodation-Folder |
---|
[622] | 13 | """ |
---|
| 14 | request = context.REQUEST |
---|
| 15 | |
---|
| 16 | wf = context.portal_workflow |
---|
| 17 | mtool = context.portal_membership |
---|
| 18 | path_info = request.get('PATH_INFO').split('/') |
---|
| 19 | |
---|
| 20 | info = {} |
---|
[635] | 21 | info['action'] = "%s" % context.absolute_url() |
---|
[622] | 22 | info['choosen_ids'] = request.get('ids',[]) |
---|
| 23 | items = [] |
---|
[1441] | 24 | is_editable = mtool.checkPermission('Modify portal content', context) |
---|
| 25 | is_editable = False |
---|
[622] | 26 | halls = context.portal_catalog(portal_type='AccoHall') |
---|
| 27 | for f in halls: |
---|
| 28 | row = {} |
---|
[1441] | 29 | row['id'] = f.id |
---|
| 30 | row['title'] = f.Title |
---|
[1447] | 31 | row['url'] = "%s/%s" % (context.absolute_url(),f.id) |
---|
[1441] | 32 | #fo = f.getObject() |
---|
| 33 | #row['is_editable'] = mtool.checkPermission('Modify portal content', fo) |
---|
| 34 | row['is_editable'] = is_editable |
---|
[622] | 35 | items.append(row) |
---|
| 36 | info['items'] = items |
---|
[1439] | 37 | return info |
---|
[626] | 38 | |
---|
Note: See
TracBrowser for help on using the repository browser.