Ignore:
Timestamp:
5 Jul 2007, 11:14:12 (18 years ago)
Author:
joachim
Message:

merged r1979:r1987 from trunk

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  
    1212    obj=context
    1313
     14
    1415parent=obj.aq_parent
    1516
  • WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/academics_index.py

    r937 r1988  
    1212return the appropriate page in the academics section
    1313"""
     14try:
     15    from Products.zdb import set_trace
     16except:
     17    def set_trace():
     18        pass
    1419
    1520request = context.REQUEST
  • WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCertificatesInfo.py

    r913 r1988  
    1212return Info about the Faculties
    1313"""
     14try:
     15    from Products.zdb import set_trace
     16except:
     17    def set_trace():
     18        pass
    1419request = context.REQUEST
    1520
     
    1924
    2025info = {}
    21 #dep_id = request.get('PATH_TRANSLATED').split('/')[-2]
    22 dep_id = context.aq_parent.getId()
     26dep_id = path_info[-2]
     27#set_trace()
    2328info['action'] = "%s" % context.absolute_url()
    2429info['choosen_ids'] = request.get('ids',[])
    2530info['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)
    2732info['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()
     37cp = '/'.join(path_info[:-2])
    3238info['container_path'] = cp
    3339info['dep_id'] = dep_id
  • WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCoursesCertificatesInfo.py

    r1434 r1988  
    1515
    1616wf = context.portal_workflow
    17 path_info = request.get('PATH_INFO').split('/')
    1817
    1918info = {}
     
    2120info['choosen_ids'] = request.get('ids',[])
    2221info['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()
     24cp = request.get('PATH_INFO')
    2525info['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.getId
    33 #    row['title'] = rd.Title()
    34 #    row['url'] = ro.absolute_url()
    35 #    items.append(row)
    36 #info['courses'] = items
    3726res = context.portal_catalog(container_path="%s/certificates" % cp)
    3827items = []
  • WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getCoursesInfo.py

    r1366 r1988  
    2828
    2929info = {}
    30 #dep_id = request.get('PATH_TRANSLATED').split('/')[-2]
    31 dep_id = context.aq_parent.getId()
     30dep_id = path_info[-2]
     31#dep_id = context.aq_parent.getId()
    3232info['action'] = "%s" % context.absolute_url()
    3333info['choosen_ids'] = request.get('ids',[])
    3434info['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()
     41cp = '/'.join(path_info[:-2])
    4142info['container_path'] = cp
    4243info['dep_id'] = dep_id
  • WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getDepartmentsInfo.py

    r913 r1988  
    1212return Info about the Faculties
    1313"""
     14try:
     15    from Products.zdb import set_trace
     16except:
     17    def set_trace():
     18        pass
    1419request = context.REQUEST
    1520
     
    1722mtool = context.portal_membership
    1823member = mtool.getAuthenticatedMember()
    19 path_info = request.get('PATH_INFO').split('/')
     24#path_info = request.get('PATH_INFO').split('/')
    2025
    2126info = {}
     
    2631items = []
    2732info['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()
     36cp = request.get('PATH_INFO')
    3037info['container_path'] = cp
    3138res = context.portal_catalog(container_path=cp)
  • WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_academics/getDocumentInfo.py

    r1783 r1988  
    1010# $Id:getDocumentInfo.py 486 2006-09-06 10:09:39Z joachim $
    1111"""
    12 return Info about the Faculties
     12return Info about the Documents
    1313"""
    14 request = context.REQUEST
    15 
    16 wf = context.portal_workflow
    17 path_info = request.get('PATH_INFO').split('/')
    1814
    1915info = {}
Note: See TracChangeset for help on using the changeset viewer.