Last change
on this file since 1959 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
|
Line | |
---|
1 | ## Script (Python) "getAccoFolderInfo" |
---|
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 | ## |
---|
10 | # $Id: getAccoFolderInfo.py 1447 2007-02-20 13:41:26Z joachim $ |
---|
11 | """ |
---|
12 | return Info about the Accommodation-Folder |
---|
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 = {} |
---|
21 | info['action'] = "%s" % context.absolute_url() |
---|
22 | info['choosen_ids'] = request.get('ids',[]) |
---|
23 | items = [] |
---|
24 | is_editable = mtool.checkPermission('Modify portal content', context) |
---|
25 | is_editable = False |
---|
26 | halls = context.portal_catalog(portal_type='AccoHall') |
---|
27 | for f in halls: |
---|
28 | row = {} |
---|
29 | row['id'] = f.id |
---|
30 | row['title'] = f.Title |
---|
31 | row['url'] = "%s/%s" % (context.absolute_url(),f.id) |
---|
32 | #fo = f.getObject() |
---|
33 | #row['is_editable'] = mtool.checkPermission('Modify portal content', fo) |
---|
34 | row['is_editable'] = is_editable |
---|
35 | items.append(row) |
---|
36 | info['items'] = items |
---|
37 | return info |
---|
38 | |
---|
Note: See
TracBrowser for help on using the repository browser.