Changeset 3473 for WAeUP_SRP/base/skins/waeup_documents
- Timestamp:
- 29 Apr 2008, 09:24:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_documents/getDocumentsInfo.py
r2013 r3473 31 31 info['doc'] = context.getContent() 32 32 33 # items = [] 34 # facs = context.portal_catalog(portal_type='WAeUPDocument') 35 # for f in facs: 36 # row = {} 37 # fo = f.getObject() 38 # fd = fo.getContent() 39 # row['id'] = fo.getId() 40 # row['title'] = fd.Title() 41 # row['url'] = fo.absolute_url() 42 # row['is_editable'] = mtool.checkPermission('Modify portal content', fo) 43 # items.append(row) 44 # items.sort(cmp_id) 33 45 items = [] 34 facs = context.portal_catalog(portal_type='WAeUPDocument') 35 for f in facs: 46 for id, doc in context.objectItems(): 36 47 row = {} 37 fo = f.getObject() 38 fd = fo.getContent() 39 row['id'] = fo.getId() 40 row['title'] = fd.Title() 41 row['url'] = fo.absolute_url() 42 row['is_editable'] = mtool.checkPermission('Modify portal content', fo) 48 row['id'] = id 49 row['title'] = doc.getContent().Title() 50 row['url'] = doc.absolute_url() 51 row['is_editable'] = mtool.checkPermission('Modify portal content', doc) 43 52 items.append(row) 44 items.sort(cmp _id)53 items.sort(cmp=lambda x,y: cmp(x['id'].lower(), y['id'].lower())) 45 54 info['items'] = items 46 55 return info
Note: See TracChangeset for help on using the changeset viewer.