Ignore:
Timestamp:
29 Apr 2008, 09:24:51 (16 years ago)
Author:
joachim
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_documents/getDocumentsInfo.py

    r2013 r3473  
    3131info['doc'] = context.getContent()
    3232
     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)
    3345items = []
    34 facs = context.portal_catalog(portal_type='WAeUPDocument')
    35 for f in facs:
     46for id, doc in context.objectItems():
    3647    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)
    4352    items.append(row)
    44 items.sort(cmp_id)
     53items.sort(cmp=lambda x,y: cmp(x['id'].lower(), y['id'].lower()))
    4554info['items'] = items
    4655return info
Note: See TracChangeset for help on using the changeset viewer.