Ignore:
Timestamp:
29 Apr 2008, 09:24:51 (17 years ago)
Author:
joachim
Message:

remove Title from all StudentObjects?,
adjust templates to use getStudentObjectitles,
remove waeup_academics.getDocumentInfo (was duplicate),
do not use portal_catalog for listing faculties and departments.

Location:
WAeUP_SRP/base/skins/waeup_default
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_default/getDocumentInfo.py

    r2013 r3473  
    1010# $Id:getDocumentInfo.py 486 2006-09-06 10:09:39Z joachim $
    1111"""
    12 return Info about the Faculties
     12return Info about a document
    1313"""
     14try:
     15    from Products.zdb import set_trace
     16except:
     17    def set_trace():
     18        pass
     19
    1420request = context.REQUEST
    1521
    16 wf = context.portal_workflow
    17 path_info = request.get('PATH_INFO').split('/')
     22#wf = context.portal_workflow
     23#path_info = request.get('PATH_INFO').split('/')
    1824
    19 mtool = context.portal_membership
    20 if mtool.isAnonymousUser():
     25# mtool = context.portal_membership
     26# if mtool.isAnonymousUser():
     27#     return None
     28
     29info = context.waeup_tool.getAccessInfo(context)
     30#set_trace()
     31
     32student_id = info['student_id']
     33if not info['is_staff'] and student_id is None:
    2134    return None
    2235
    23 info = {}
     36titles = context.getStudentObjectTitles()
     37info['title'] = titles.get(context.portal_type,'') or context.title_or_id
    2438try:
    2539    info['doc'] = context.getContent()
  • WAeUP_SRP/base/skins/waeup_default/waeup_document_view.pt

    r3294 r3473  
    33                tal:define="info context/getDocumentInfo;
    44                s_name context/getStudentNameInContext;
    5                 is_so context/isSectionOfficer;">
     5                is_so info/is_sectionofficer;">
    66
    77      <span tal:condition="not: info">
     
    1010      <span tal:condition="info">
    1111   
    12       <a href="" tal:attributes="href string:${here/academicsParent}">
     12      <a href="" tal:attributes="href string:${here/aq_parent/absolute_url}">
    1313        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
    1414        Up one level
    1515      </a>
    1616     
    17       <h3 tal:condition="here/title_or_id">
     17      <h3>
    1818         <span tal:condition="python:is_so and s_name">
    1919           <span tal:content="s_name" />:
    2020         </span>
    21          <span tal:content="here/title_or_id" />
     21         <span tal:content="info/title" />
    2222      </h3>
    2323     
Note: See TracChangeset for help on using the changeset viewer.