- Timestamp:
- 5 Jul 2007, 11:14:12 (18 years ago)
- Location:
- WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/academicsParent.py
r486 r1988 12 12 obj=context 13 13 14 14 15 parent=obj.aq_parent 15 16 -
WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/academics_index.py
r937 r1988 12 12 return the appropriate page in the academics section 13 13 """ 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 14 19 15 20 request = context.REQUEST -
WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCertificatesInfo.py
r913 r1988 12 12 return Info about the Faculties 13 13 """ 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 14 19 request = context.REQUEST 15 20 … … 19 24 20 25 info = {} 21 #dep_id = request.get('PATH_TRANSLATED').split('/')[-2]22 dep_id = context.aq_parent.getId()26 dep_id = path_info[-2] 27 #set_trace() 23 28 info['action'] = "%s" % context.absolute_url() 24 29 info['choosen_ids'] = request.get('ids',[]) 25 30 info['doc'] = context.getContent() 26 res = context.portal_catalog(meta_type="Department",id = dep_id)31 #res = context.portal_catalog(meta_type="Department",id = dep_id) 27 32 info['courses'] = [] 28 if not res: 29 return info 30 brain = res[-1] 31 cp = brain.getPath() 33 # if not res: 34 # return info 35 # brain = res[-1] 36 # cp = brain.getPath() 37 cp = '/'.join(path_info[:-2]) 32 38 info['container_path'] = cp 33 39 info['dep_id'] = dep_id -
WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCoursesCertificatesInfo.py
r1434 r1988 15 15 16 16 wf = context.portal_workflow 17 path_info = request.get('PATH_INFO').split('/')18 17 19 18 info = {} … … 21 20 info['choosen_ids'] = request.get('ids',[]) 22 21 info['doc'] = context.getContent() 23 brain = context.portal_catalog(meta_type="Department", id = context.getId())[-1] 24 cp = brain.getPath() 22 # brain = context.portal_catalog(meta_type="Department", id = context.getId())[-1] 23 # cp = brain.getPath() 24 cp = request.get('PATH_INFO') 25 25 info['container_path'] = cp 26 #res = context.portal_catalog(container_path="%s/courses" % cp)27 #items = []28 #for r in res:29 # row = {}30 # ro = r.getObject()31 # rd = ro.getContent()32 # row['id'] = r.getId33 # row['title'] = rd.Title()34 # row['url'] = ro.absolute_url()35 # items.append(row)36 #info['courses'] = items37 26 res = context.portal_catalog(container_path="%s/certificates" % cp) 38 27 items = [] -
WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCoursesInfo.py
r1366 r1988 28 28 29 29 info = {} 30 #dep_id = request.get('PATH_TRANSLATED').split('/')[-2]31 dep_id = context.aq_parent.getId()30 dep_id = path_info[-2] 31 #dep_id = context.aq_parent.getId() 32 32 info['action'] = "%s" % context.absolute_url() 33 33 info['choosen_ids'] = request.get('ids',[]) 34 34 info['doc'] = context.getContent() 35 res = context.portal_catalog(meta_type="Department",id = dep_id) 36 info['courses'] = [] 37 if not res: 38 return info 39 brain = res[-1] 40 cp = brain.getPath() 35 # res = context.portal_catalog(meta_type="Department",id = dep_id) 36 # info['courses'] = [] 37 # if not res: 38 # return info 39 # brain = res[-1] 40 # cp = brain.getPath() 41 cp = '/'.join(path_info[:-2]) 41 42 info['container_path'] = cp 42 43 info['dep_id'] = dep_id -
WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getDepartmentsInfo.py
r913 r1988 12 12 return Info about the Faculties 13 13 """ 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 14 19 request = context.REQUEST 15 20 … … 17 22 mtool = context.portal_membership 18 23 member = mtool.getAuthenticatedMember() 19 path_info = request.get('PATH_INFO').split('/')24 #path_info = request.get('PATH_INFO').split('/') 20 25 21 26 info = {} … … 26 31 items = [] 27 32 info['doc'] = context.getContent() 28 brain = context.portal_catalog(meta_type="Faculty", id = context.getId())[-1] 29 cp = brain.getPath() 33 # set_trace() 34 # brain = context.portal_catalog(portal_type="Faculty", id = context.getId())[-1] 35 # cp = brain.getPath() 36 cp = request.get('PATH_INFO') 30 37 info['container_path'] = cp 31 38 res = context.portal_catalog(container_path=cp) -
WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getDocumentInfo.py
r1783 r1988 10 10 # $Id:getDocumentInfo.py 486 2006-09-06 10:09:39Z joachim $ 11 11 """ 12 return Info about the Faculties12 return Info about the Documents 13 13 """ 14 request = context.REQUEST15 16 wf = context.portal_workflow17 path_info = request.get('PATH_INFO').split('/')18 14 19 15 info = {}
Note: See TracChangeset for help on using the changeset viewer.