Changeset 7277 for main/waeup.sirp/trunk
- Timestamp:
- 6 Dec 2011, 07:39:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7275 r7277 506 506 507 507 class StudentRejectClearanceActionButton(ManageActionButton): 508 grok.order( 2)508 grok.order(3) 509 509 grok.context(IStudent) 510 510 grok.view(StudentClearanceDisplayFormPage) … … 519 519 return '' 520 520 return self.view.url(self.view.context, self.target) 521 522 class ClearanceSlipActionButton(ManageActionButton): 523 grok.order(4) 524 grok.context(IStudent) 525 grok.view(StudentClearanceDisplayFormPage) 526 grok.require('waeup.viewStudent') 527 icon = 'actionicon_pdf.png' 528 text = 'Download clearance slip' 529 target = 'clearance.pdf' 530 531 class ExportPDFClearanceSlipPage(grok.View): 532 """Deliver a PDF slip of the context. 533 """ 534 grok.context(IStudent) 535 grok.name('clearance.pdf') 536 grok.require('waeup.viewStudent') 537 form_fields = grok.AutoFields(IStudentClearance).omit('clearance_locked') 538 prefix = 'form' 539 540 @property 541 def label(self): 542 return 'Clearance Slip of %s' % self.context.fullname 543 544 def render(self): 545 studentview = StudentBaseDisplayFormPage(self.context.getStudent(), 546 self.request) 547 students_utils = getUtility(IStudentsUtils) 548 return students_utils.renderPDF( 549 self,'Clearance', 'clearance.pdf', 550 self.context.getStudent, studentview) 521 551 522 552 class StudentClearanceManageFormPage(WAeUPEditFormPage):
Note: See TracChangeset for help on using the changeset viewer.