source: WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py @ 1440

Last change on this file since 1440 was 1439, checked in by Henrik Bettermann, 18 years ago

optimized

  • Property svn:keywords set to Id
File size: 828 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 1439 2007-02-19 14:52:32Z henrik $
11"""
12return Info about the Faculties
13"""
14request = context.REQUEST
15
16wf = context.portal_workflow
17mtool = context.portal_membership
18path_info = request.get('PATH_INFO').split('/')
19
20info = {}
21info['action'] = "%s" % context.absolute_url()
22info['choosen_ids'] = request.get('ids',[])
23items = []
24halls = context.portal_catalog(portal_type='AccoHall')
25for f in halls:
26    row = {}
27    fo = f.getObject()
28    row['id'] = fo.getId()
29    row['title'] = fo.Title()
30    row['url'] = fo.absolute_url()
31    row['is_editable'] = mtool.checkPermission('Modify portal content', fo)
32    items.append(row)
33info['items'] = items
34return info
35
Note: See TracBrowser for help on using the repository browser.