Changeset 6008
- Timestamp:
- 2 May 2011, 09:21:22 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/breadcrumbs.py
r5988 r6008 127 127 """ 128 128 grok.context(interfaces.IDepartment) 129 130 class CourseBreadcrumb(FacultyBreadcrumb): 131 """A breadcrumb for courses. 132 """ 133 grok.context(interfaces.ICourse) 134 135 class CertificateBreadcrumb(FacultyBreadcrumb): 136 """A breadcrumb for certificates. 137 """ 138 grok.context(interfaces.ICertificate) 129 139 130 140 class CourseContainerBreadcrumb(Breadcrumb): … … 146 156 @property 147 157 def title(self): 148 return self.context. course.title158 return self.context.longtitle() 149 159 150 160 def getBreadcrumb(obj, viewname=None): -
main/waeup.sirp/trunk/src/waeup/sirp/browser/browser.txt
r6007 r6008 693 693 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 694 694 ...<td>Level:</td> 695 ...<td>200 </td>695 ...<td>200 (Year 2)</td> 696 696 ... 697 697 -
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r6007 r6008 43 43 from waeup.sirp.university.catalog import search 44 44 from waeup.sirp.widgets.interfaces import ITableProvider 45 from waeup.sirp.university.vocabularies import course_levels 45 46 46 47 grok.context(IWAeUPObject) … … 1513 1514 @property 1514 1515 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 1516 1521 1517 1522 class 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> 2 2 3 <table class=" listing">3 <table class="zebra"> 4 4 <thead> 5 5 </thead> 6 6 <tbody> 7 <tr class="odd">7 <tr> 8 8 <td>Code:</td> 9 9 <td tal:content="context/__name__">CODE</td> 10 10 </tr> 11 <tr class="even">11 <tr> 12 12 <td>Course Code:</td> 13 13 <td tal:content="context/getCourseCode">THE COURSE</td> 14 14 </tr> 15 <tr class="even">15 <tr> 16 16 <td>Course Title:</td> 17 17 <td tal:content="context/course/title">THE TITLE</td> 18 18 </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> 20 28 <td>Level:</td> 21 <td tal:content=" context/level">LEVEL</td>29 <td tal:content="view/leveltitle">LEVEL</td> 22 30 </tr> 23 <tr class="even">31 <tr> 24 32 <td>Is mandatory course (not elective):</td> 25 33 <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> 2 2 3 3 <table class="zebra"> -
main/waeup.sirp/trunk/src/waeup/sirp/university/certificate.py
r5977 r6008 13 13 from waeup.sirp.university.interfaces import ( 14 14 ICertificate, ICertificateAdd, ICertificateCourse, ICourse) 15 from waeup.sirp.university.vocabularies import course_levels 15 16 16 17 class Certificate(grok.Container): … … 56 57 57 58 #review_state = property(getReviewState, setReviewState) 59 60 def longtitle(self): 61 return "%s (%s)" % (self.title,self.code) 58 62 59 63 def addCourseRef(self, course, level=100, core_or_elective=True): … … 105 109 """ 106 110 return self.course.code 111 112 def longtitle(self): 113 return "%s in level %s" % (self.course.code, 114 course_levels.getTerm(self.level).title) 107 115 108 116 class CertificateCourseFactory(grok.GlobalUtility): -
main/waeup.sirp/trunk/src/waeup/sirp/university/course.py
r5953 r6008 24 24 self.semester = semester 25 25 26 def longtitle(self): 27 return "%s (%s)" % (self.title,self.code) 28 26 29 class CourseFactory(grok.GlobalUtility): 27 30 """A factory for courses. -
main/waeup.sirp/trunk/src/waeup/sirp/university/interfaces.py
r5995 r6008 154 154 required = True, 155 155 ) 156 157 def longtitle(): 158 """ 159 Returns the long title of a course. 160 """ 156 161 157 162 class ICourseAdd(ICourse): … … 221 226 ) 222 227 228 def longtitle(): 229 """ 230 Returns the long title of a certificate. 231 """ 232 223 233 class ICertificateAdd(ICertificate): 224 234 """Representation of a certificate. … … 273 283 """ 274 284 285 def longtitle(): 286 """ 287 Returns the long title of a certificatecourse. 288 """ 289 275 290 276 291 class ICertificateCourseAdd(ICertificateCourse):
Note: See TracChangeset for help on using the changeset viewer.