Changeset 256 for waeup_product/trunk/skins/waeup_faculty
- Timestamp:
- 20 Jun 2006, 10:44:04 (18 years ago)
- Location:
- waeup_product/trunk/skins/waeup_faculty
- Files:
-
- 2 added
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/skins/waeup_faculty/create_certificate.py
r250 r256 5 5 6 6 """ 7 type_name = ' StudyCourse'7 type_name = 'Certificate' 8 8 REQUEST.set('type_name',type_name) 9 9 … … 16 16 lt = context.portal_layouts 17 17 18 res,psm,ds = lt.renderLayout(layout_id= ' studycourse',19 schema_id = ' studycourse',18 res,psm,ds = lt.renderLayout(layout_id= 'certificate', 19 schema_id = 'certificate', 20 20 context=context, 21 21 mapping=validate and REQUEST, 22 22 ob={}, 23 23 layout_mode='create', 24 create_action = 'create_ studycourse',24 create_action = 'create_certificate', 25 25 ) 26 26 if psm == 'invalid': -
waeup_product/trunk/skins/waeup_faculty/get_departments_voc.py
r182 r256 6 6 """ 7 7 #academics = context.sections.portal.academics 8 academics = context.portal_catalog(id = 'academics')[0].getObject()9 faculties = [f for f in context.filterContents(items=academics.contentValues()) if f.portal_type == 'Faculty']8 #academics = context.portal_catalog(id = 'academics')[0].getObject() 9 #faculties = [f for f in context.filterContents(items=academics.contentValues()) if f.portal_type == 'Faculty'] 10 10 11 deplist = [] 12 for faculty in faculties: 13 departments = [d for d in context.filterContents(items=faculty.contentValues()) if d.portal_type == 'Department'] 14 deplist.extend(departments) 15 if not key: 16 return [(d.getId(),d.title_or_id(),) for d in deplist] 17 return [d.title_or_id() for d in deplist if d.getId() == key][0] 18 return [(d.getId(),d.title_or_id()) for d in deplist if d.getId() == key] 11 #return res 12 #return [(d.id,d.Title,) for d in res] 13 if key is None: 14 res = context.portal_catalog({'meta_type': "Department"}) 15 return [(d.getId,d.Title,) for d in res] 16 res = context.portal_catalog({'meta_type': "Department", 'id': key}) 17 return res[-1].Title 18 return [(d.getId,d.title_or_id(),) for d in res][-1] 19 20 #return [d.title_or_id() for d in deplist if d.getId() == key][0] 21 #return [(d.getId(),d.title_or_id()) for d in deplist if d.getId() == key]
Note: See TracChangeset for help on using the changeset viewer.