Ignore:
Timestamp:
2 May 2011, 09:21:22 (14 years ago)
Author:
Henrik Bettermann
Message:

Provide longtitle for all university instances. Use lontitle in breadcrumbs. Show faculty and department on certificatecoursepage.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/browser
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/breadcrumbs.py

    r5988 r6008  
    127127    """
    128128    grok.context(interfaces.IDepartment)
     129   
     130class CourseBreadcrumb(FacultyBreadcrumb):
     131    """A breadcrumb for courses.
     132    """
     133    grok.context(interfaces.ICourse)   
     134   
     135class CertificateBreadcrumb(FacultyBreadcrumb):
     136    """A breadcrumb for certificates.
     137    """
     138    grok.context(interfaces.ICertificate)       
    129139
    130140class CourseContainerBreadcrumb(Breadcrumb):
     
    146156    @property
    147157    def title(self):
    148         return self.context.course.title
     158        return self.context.longtitle()
    149159
    150160def getBreadcrumb(obj, viewname=None):
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt

    r6007 r6008  
    693693  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    694694  ...<td>Level:</td>
    695   ...<td>200</td>
     695  ...<td>200 (Year 2)</td>
    696696  ...
    697697
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r6007 r6008  
    4343from waeup.sirp.university.catalog import search
    4444from waeup.sirp.widgets.interfaces import ITableProvider
     45from waeup.sirp.university.vocabularies import course_levels
    4546
    4647grok.context(IWAeUPObject)
     
    15131514    @property
    15141515    def title(self):
    1515         return 'Course Referrer: %s' % (self.context.__name__)
     1516        return 'Course Referrer: %s' % (self.context.longtitle())
     1517   
     1518    @property   
     1519    def leveltitle(self):
     1520        return course_levels.getTerm(self.context.level).title
    15161521
    15171522class CertificateCourseManageFormPage(WAeUPEditFormPage):
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatecoursepage.pt

    r5977 r6008  
    1 <h2 tal:content="context/__name__">TITLE</h2>
     1<h2 tal:content="context/longtitle">TITLE</h2>
    22
    3 <table class="listing">
     3<table class="zebra">
    44  <thead>
    55  </thead>
    66  <tbody>
    7     <tr class="odd">
     7    <tr>
    88      <td>Code:</td>
    99      <td tal:content="context/__name__">CODE</td>
    1010    </tr> 
    11     <tr class="even">
     11    <tr>
    1212      <td>Course Code:</td>
    1313      <td tal:content="context/getCourseCode">THE COURSE</td>
    1414    </tr>   
    15     <tr class="even">
     15    <tr>
    1616      <td>Course Title:</td>
    1717      <td tal:content="context/course/title">THE TITLE</td>
    1818    </tr>
    19     <tr class="odd">
     19    <tr>
     20      <td>Provided by:</td>
     21      <td>
     22      <span tal:content="python: context.course.__parent__.__parent__.longtitle()">DEPARTMENT</span>
     23      <br />
     24      <span tal:content="python: context.course.__parent__.__parent__.__parent__.longtitle()">FACULTY</span>
     25      </td>
     26    </tr>   
     27    <tr>
    2028      <td>Level:</td>
    21       <td tal:content="context/level">LEVEL</td>
     29      <td tal:content="view/leveltitle">LEVEL</td>
    2230    </tr>
    23     <tr class="even">
     31    <tr>
    2432      <td>Is mandatory course (not elective):</td>
    2533      <td tal:content="context/core_or_elective">MANDATORY</td>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt

    r6007 r6008  
    1 <h2 tal:content="context/title">TITLE</h2>
     1<h2 tal:content="context/longtitle">TITLE</h2>
    22
    33<table class="zebra">
Note: See TracChangeset for help on using the changeset viewer.