Changeset 7318 for main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
- Timestamp:
- 9 Dec 2011, 12:34:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7310 r7318 90 90 """ 91 91 grok.context(IStudentsContainer) 92 title = u'Students'92 title = 'Students' 93 93 94 94 class StudentBreadcrumb(Breadcrumb): … … 104 104 """ 105 105 grok.context(IStudentStudyCourse) 106 title = u'Study Course'106 title = 'Study Course' 107 107 108 108 class PaymentsBreadcrumb(Breadcrumb): … … 110 110 """ 111 111 grok.context(IStudentPaymentsContainer) 112 title = u'Payments'112 title = 'Payments' 113 113 114 114 class OnlinePaymentBreadcrumb(Breadcrumb): … … 125 125 """ 126 126 grok.context(IStudentAccommodation) 127 title = u'Accommodation'127 title = 'Accommodation' 128 128 129 129 #@property … … 536 536 grok.require('waeup.viewStudent') 537 537 form_fields = grok.AutoFields(IStudentClearance).omit('clearance_locked') 538 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le') 538 539 prefix = 'form' 540 title = 'Clearance Data' 539 541 540 542 @property … … 547 549 students_utils = getUtility(IStudentsUtils) 548 550 return students_utils.renderPDF( 549 self, 'Clearance','clearance.pdf',551 self, 'clearance.pdf', 550 552 self.context.getStudent(), studentview) 551 553 … … 819 821 form_fields = grok.AutoFields(IStudentStudyLevel) 820 822 prefix = 'form' 823 title = 'Level Data' 824 content_title = 'Course List' 821 825 822 826 @property … … 828 832 self.request) 829 833 students_utils = getUtility(IStudentsUtils) 834 tabledata = sorted(self.context.values(), 835 key=lambda value: str(value.semester) + value.code) 830 836 return students_utils.renderPDF( 831 self, 'Course Registration','course_registration.pdf',837 self, 'course_registration.pdf', 832 838 self.context.getStudent(), studentview, 833 839 tableheader=[('Sem.','semester', 1.5),('Code','code', 2.5), … … 838 844 ('Score', 'score', 1.5),('Auto', 'automatic', 1.5) 839 845 ], 840 tabledata= self.context.values())846 tabledata=tabledata) 841 847 842 848 class StudyLevelManageActionButton(ManageActionButton): … … 1255 1261 form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le') 1256 1262 prefix = 'form' 1263 title = 'Payment Data' 1257 1264 1258 1265 @property … … 1268 1275 self.request) 1269 1276 students_utils = getUtility(IStudentsUtils) 1270 return students_utils.renderPDF(self, 'Payment','payment_receipt.pdf',1277 return students_utils.renderPDF(self, 'payment_receipt.pdf', 1271 1278 self.context.getStudent(), studentview) 1272 1279 … … 1479 1486 form_fields['booking_date'].custom_widget = FriendlyDateDisplayWidget('le') 1480 1487 prefix = 'form' 1488 title = 'Bed Allocation Data' 1481 1489 1482 1490 @property 1483 1491 def label(self): 1484 return 'Bed Allocation %s' % self.context.bed_coordinates1492 return 'Bed Allocation: %s' % self.context.bed_coordinates 1485 1493 1486 1494 def render(self): … … 1489 1497 students_utils = getUtility(IStudentsUtils) 1490 1498 return students_utils.renderPDF( 1491 self, 'Bed Allocation','bed_allocation.pdf',1499 self, 'bed_allocation.pdf', 1492 1500 self.context.getStudent(), studentview) 1493 1501
Note: See TracChangeset for help on using the changeset viewer.