Changeset 689 for WAeUP_SRP/trunk


Ignore:
Timestamp:
13 Oct 2006, 12:45:55 (18 years ago)
Author:
joachim
Message:

show semester in courses_view

Location:
WAeUP_SRP/trunk/skins/waeup_academics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_academics/courses_view.pt

    r653 r689  
    6565                    <strong tal:content="row/title" /></a> </td>
    6666                <td tal:content="row/id"> </td>
     67                <td tal:content="row/semester"> </td>
    6768                <td tal:condition="row/is_editable" tal:content="row/review_state"> </td>
    6869                <td>
  • WAeUP_SRP/trunk/skins/waeup_academics/getCoursesInfo.py

    r603 r689  
    3737res = context.portal_catalog(container_path="%s/courses" % cp)
    3838items = []
    39 for r in res:
    40     row = {}
    41     ro = r.getObject()
    42     rd = ro.getContent()
    43     row['id'] = r.getId
    44     row['title'] = rd.Title()
    45     row['url'] = ro.absolute_url()
    46     row['review_state'] = wf.getInfoFor(ro,'review_state','None')
    47     row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
    48     items.append(row)
     39for sem in ('1','2'):
     40    for r in res:
     41        row = {}
     42        ro = r.getObject()
     43        rd = ro.getContent()
     44        if rd.semester != sem:
     45            continue
     46        row['id'] = r.getId
     47        row['title'] = rd.Title()
     48        row['semester'] = rd.semester
     49        row['url'] = ro.absolute_url()
     50        row['review_state'] = wf.getInfoFor(ro,'review_state','None')
     51        row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
     52        items.append(row)
    4953info['courses'] = items
    5054return info
Note: See TracChangeset for help on using the changeset viewer.