Last change
on this file since 16536 was
3473,
checked in by joachim, 17 years ago
|
remove Title from all StudentObjects?,
adjust templates to use getStudentObjectitles,
remove waeup_academics.getDocumentInfo (was duplicate),
do not use portal_catalog for listing faculties and departments.
|
-
Property svn:keywords set to
Id
|
File size:
1.0 KB
|
Line | |
---|
1 | ## Script (Python) "getFolderObjectsInfo" |
---|
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:getFolderObjectsInfo.py 486 2006-09-06 10:09:39Z joachim $ |
---|
11 | """ |
---|
12 | return Info about the FolderObjects |
---|
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 = context.waeup_tool.getAccessInfo(context) |
---|
21 | info['action'] = "%s" % context.absolute_url() |
---|
22 | info['choosen_ids'] = request.get('ids',[]) |
---|
23 | info['doc'] = context.getContent() |
---|
24 | items = [] |
---|
25 | for id, object in context.objectItems(): |
---|
26 | row = {} |
---|
27 | row['id'] = id |
---|
28 | content = object.getContent() |
---|
29 | row['title'] = getattr(content,'LongTitle',None) or content.Title |
---|
30 | row['url'] = object.absolute_url() |
---|
31 | row['is_editable'] = mtool.checkPermission('Modify portal content', object) |
---|
32 | items.append(row) |
---|
33 | items.sort(cmp=lambda x,y: cmp(x['id'].lower(), y['id'].lower())) |
---|
34 | info['items'] = items |
---|
35 | return info |
---|
Note: See
TracBrowser for help on using the repository browser.