Changeset 182 for waeup_product/trunk/skins/waeup_faculty
- Timestamp:
- 16 Nov 2005, 23:30:12 (19 years ago)
- Location:
- waeup_product/trunk/skins/waeup_faculty
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/skins/waeup_faculty/get_departments_voc.py
r173 r182 5 5 6 6 """ 7 academics = context.sections.portal.academics 7 #academics = context.sections.portal.academics 8 academics = context.portal_catalog(id = 'academics')[0].getObject() 8 9 faculties = [f for f in context.filterContents(items=academics.contentValues()) if f.portal_type == 'Faculty'] 9 10 … … 12 13 departments = [d for d in context.filterContents(items=faculty.contentValues()) if d.portal_type == 'Department'] 13 14 deplist.extend(departments) 14 if key is None:15 if not key: 15 16 return [(d.getId(),d.title_or_id(),) for d in deplist] 16 17 return [d.title_or_id() for d in deplist if d.getId() == key][0] -
waeup_product/trunk/skins/waeup_faculty/get_faculties_voc.py
r173 r182 5 5 6 6 """ 7 academics = context. sections.portal.academics7 academics = context.portal_catalog(id = 'academics')[-1].getObject() 8 8 items = [i for i in context.filterContents(items=academics.contentValues()) if i.portal_type == 'Faculty'] 9 if key is None: 9 context.REQUEST.set('items', items) 10 context.REQUEST.set('key', key) 11 if not key: 10 12 return [(f.getId(),f.title_or_id(),) for f in items] 11 13 return [f.title_or_id() for f in items if f.getId() == key][0]
Note: See TracChangeset for help on using the changeset viewer.