- Timestamp:
- 4 Nov 2013, 09:19:39 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/viewlets.py
r9873 r10691 17 17 ## 18 18 19 import grok 19 20 from waeup.kofa.students.viewlets import ( 20 AddPreviousPaymentActionButton, AddBalancePaymentActionButton) 21 AddPreviousPaymentActionButton, AddBalancePaymentActionButton, 22 ManageActionButton) 23 from waeup.kofa.students.interfaces import IStudent 24 from waeup.kofa.students.browser import StudentBaseDisplayFormPage 25 from waeup.kofa.students.workflow import ( 26 ADMITTED, PAID, REQUESTED, RETURNING, CLEARED, REGISTERED, 27 VALIDATED, GRADUATED, TRANSCRIPT, CREATED, CLEARANCE) 28 from waeup.kwarapoly.interfaces import MessageFactory as _ 21 29 22 30 class AddPreviousPaymentActionButton(AddPreviousPaymentActionButton): … … 31 39 def target_url(self): 32 40 return '' 41 42 class AdmissionNotificationActionButton(ManageActionButton): 43 grok.order(4) 44 grok.context(IStudent) 45 grok.view(StudentBaseDisplayFormPage) 46 grok.require('waeup.viewStudent') 47 icon = 'actionicon_pdf.png' 48 text = _('Download admission notification') 49 target = 'admission_notification.pdf' 50 51 @property 52 def target_url(self): 53 if self.context.state not in (ADMITTED, CLEARANCE, REQUESTED, CLEARED): 54 return '' 55 return self.view.url(self.view.context, self.target) 56 57 class AdmissionSlipActionButton(ManageActionButton): 58 grok.order(4) 59 grok.context(IStudent) 60 grok.view(StudentBaseDisplayFormPage) 61 grok.require('waeup.viewStudent') 62 icon = 'actionicon_pdf.png' 63 text = _('Download admission letter') 64 target = 'admission_slip.pdf' 65 66 @property 67 def target_url(self): 68 if self.context.state in (CREATED, ADMITTED, 69 CLEARANCE, REQUESTED, CLEARED): 70 return '' 71 return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.