Changeset 9452 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 29 Oct 2012, 08:08:23 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py
r8552 r9452 113 113 # append history 114 114 data.extend(creator.fromStringList(self.context.history.messages)) 115 data.append(Spacer(1, 20)) 115 116 116 117 # append photograph -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py
r9451 r9452 212 212 for msg in string_list: 213 213 result.append(Paragraph(msg, CODE_STYLE)) 214 result.append(Spacer(1, 20))215 214 return result 216 215 -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9437 r9452 597 597 """ 598 598 grok.context(IStudent) 599 grok.name('clearance .pdf')599 grok.name('clearance_slip.pdf') 600 600 grok.require('waeup.viewStudent') 601 601 prefix = 'form' 602 omit_fields = ('password', 'suspended', 'phone', 'adm_code' , 'sex')602 omit_fields = ('password', 'suspended', 'phone', 'adm_code') 603 603 604 604 @property … … 635 635 students_utils = getUtility(IStudentsUtils) 636 636 return students_utils.renderPDF( 637 self, 'clearance .pdf',637 self, 'clearance_slip.pdf', 638 638 self.context.student, studentview, signatures=self._signatures()) 639 639 … … 1000 1000 """ 1001 1001 grok.context(IStudentStudyLevel) 1002 grok.name('course_registration .pdf')1002 grok.name('course_registration_slip.pdf') 1003 1003 grok.require('waeup.viewStudent') 1004 1004 form_fields = grok.AutoFields(IStudentStudyLevel) … … 1044 1044 key=lambda value: str(value.semester) + value.code) 1045 1045 return students_utils.renderPDF( 1046 self, 'course_registration .pdf',1046 self, 'course_registration_slip.pdf', 1047 1047 self.context.student, studentview, 1048 1048 tableheader=[(Sem,'semester', 1.5),(Code,'code', 2.5), … … 1684 1684 """ 1685 1685 grok.context(IBedTicket) 1686 grok.name('bed_allocation .pdf')1686 grok.name('bed_allocation_slip.pdf') 1687 1687 grok.require('waeup.handleAccommodation') 1688 1688 form_fields = grok.AutoFields(IBedTicket) 1689 1689 form_fields['booking_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 1690 1690 prefix = 'form' 1691 omit_fields = ('password', 'suspended', 'phone', 'adm_code' , 'sex')1691 omit_fields = ('password', 'suspended', 'phone', 'adm_code') 1692 1692 1693 1693 @property … … 1712 1712 students_utils = getUtility(IStudentsUtils) 1713 1713 return students_utils.renderPDF( 1714 self, 'bed_allocation .pdf',1714 self, 'bed_allocation_slip.pdf', 1715 1715 self.context.student, studentview) 1716 1716 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9438 r9452 646 646 self.browser.open(self.manage_student_path) 647 647 self.browser.getControl('Delete').click() 648 self.browser.open(self.student_path + '/clearance .pdf')648 self.browser.open(self.student_path + '/clearance_slip.pdf') 649 649 self.assertEqual(self.browser.headers['Status'], '200 Ok') 650 650 self.assertEqual(self.browser.headers['Content-Type'], … … 2319 2319 2320 2320 # Students can open the pdf slip 2321 self.browser.open(self.browser.url + '/bed_allocation .pdf')2321 self.browser.open(self.browser.url + '/bed_allocation_slip.pdf') 2322 2322 self.assertEqual(self.browser.headers['Status'], '200 Ok') 2323 2323 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r9450 r9452 135 135 data_right.append([f_label,f_text]) 136 136 137 if getattr(studentview.context, 'certcode' ):137 if getattr(studentview.context, 'certcode', None): 138 138 f_label = formatted_label(size=12) % _('Study Course') 139 139 f_label = Paragraph(f_label, style["Normal"]) … … 505 505 footer_text = "%s - %s - " % (student.student_id, footer_text) 506 506 507 # Insert history508 if not filename.startswith('payment'):509 data.extend(creator.fromStringList(student.history.messages))510 511 507 # Insert student data table 512 508 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE … … 529 525 data.extend(docs_as_flowables(view, portal_language)) 530 526 531 # Insert content table (optionally on second page) 527 # Insert history 528 if filename.startswith('clearance') or filename.startswith('course'): 529 hist_translation = trans(_('Workflow History'), portal_language) 530 data.append(Paragraph(hist_translation, style["Heading3"])) 531 data.extend(creator.fromStringList(student.history.messages)) 532 533 # Insert content table (optionally on second page) 532 534 if tabledata and tableheader: 533 535 #data.append(PageBreak()) -
main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
r9397 r9452 287 287 icon = 'actionicon_pdf.png' 288 288 text = _('Download clearance slip') 289 target = 'clearance .pdf'289 target = 'clearance_slip.pdf' 290 290 291 291 class ClearanceViewActionButton(ManageActionButton): … … 395 395 icon = 'actionicon_pdf.png' 396 396 text = _('Download course registration slip') 397 target = 'course_registration .pdf'397 target = 'course_registration_slip.pdf' 398 398 399 399 @property … … 466 466 icon = 'actionicon_pdf.png' 467 467 text = _('Download bed allocation slip') 468 target = 'bed_allocation .pdf'468 target = 'bed_allocation_slip.pdf' 469 469 470 470 class RelocateStudentActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.