- Timestamp:
- 6 May 2015, 10:13:38 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/viewlets.py
r11931 r12907 18 18 19 19 import grok 20 from zope.component import getUtility 20 21 from waeup.kofa.students.viewlets import ( 21 22 AddPreviousPaymentActionButton, AddBalancePaymentActionButton, 22 23 ManageActionButton) 23 from waeup.kofa.students.interfaces import IStudent 24 from waeup.kofa.students.interfaces import IStudent, IStudentsUtils 24 25 from waeup.kofa.students.browser import StudentBaseDisplayFormPage 25 26 from waeup.kofa.students.workflow import ( … … 86 87 return '' 87 88 return self.view.url(self.view.context, self.target) 89 90 91 class GetMatricNumberActionButton(ManageActionButton): 92 grok.order(10) 93 grok.context(IStudent) 94 grok.view(StudentBaseDisplayFormPage) 95 grok.require('waeup.viewStudent') 96 icon = 'actionicon_count.png' 97 text = _('Get Matriculation Number') 98 99 @property 100 def target_url(self): 101 students_utils = getUtility(IStudentsUtils) 102 if self.context.matric_number: 103 return '' 104 error, matric_number = students_utils.constructMatricNumber( 105 self.context) 106 if error: 107 return '' 108 return self.view.url(self.view.context, 'get_matric_number')
Note: See TracChangeset for help on using the changeset viewer.