Changeset 13039
- Timestamp:
- 5 Jun 2015, 17:06:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/viewlets.py
r12975 r13039 19 19 import grok 20 20 from zope.component import getUtility 21 from waeup.kofa.interfaces import REGISTERED 21 22 from waeup.kofa.students.interfaces import IStudent, IStudentsUtils 22 23 from waeup.kofa.students.workflow import PAID … … 24 25 AddPreviousPaymentActionButton, AddBalancePaymentActionButton, 25 26 ManageActionButton, StudentBaseDisplayFormPage) 27 from waeup.kofa.students.browser import StudyLevelDisplayFormPage 26 28 29 from waeup.aaue.students.interfaces import ICustomStudentStudyLevel 27 30 from waeup.aaue.interfaces import MessageFactory as _ 28 31 … … 74 77 return '' 75 78 return self.view.url(self.view.context, self.target) 79 80 class CourseRegistrationSlipActionButton(ManageActionButton): 81 grok.order(5) 82 grok.context(ICustomStudentStudyLevel) 83 grok.view(StudyLevelDisplayFormPage) 84 grok.require('waeup.viewStudent') 85 icon = 'actionicon_pdf.png' 86 text = _('Download course registration slip') 87 target = 'course_registration_slip.pdf' 88 89 @property 90 def target_url(self): 91 is_current = self.context.__parent__.is_current 92 if not is_current: 93 return '' 94 if self.context.student.state != REGISTERED \ 95 or self.context.student.current_level != self.context.level: 96 return '' 97 return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.