- Timestamp:
- 28 Nov 2019, 08:21:23 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/viewlets.py
r15849 r15859 23 23 from waeup.kofa.students.interfaces import IStudent, IStudentsUtils 24 24 from kofacustom.iuokada.students.interfaces import ( 25 ICustomStudentStudyCourse, ICustomStudentStudyLevel )25 ICustomStudentStudyCourse, ICustomStudentStudyLevel, ICustomStudent) 26 26 from waeup.kofa.students.fileviewlets import ( 27 27 StudentFileDisplay, StudentFileUpload, StudentImage) … … 31 31 32 32 from kofacustom.nigeria.interfaces import MessageFactory as _ 33 34 class SwitchLibraryAccessActionButton(ManageActionButton): 35 grok.order(7) 36 grok.context(ICustomStudent) 37 grok.view(StudentBaseDisplayFormPage) 38 grok.require('waeup.switchLibraryAccess') 39 text = _('Switch library access') 40 target = 'switch_library_access' 41 icon = 'actionicon_book.png' 42 33 43 34 44 class GetMatricNumberActionButton(ManageActionButton): … … 50 60 return '' 51 61 return self.view.url(self.view.context, 'get_matric_number') 62 63 # Library 64 65 class LibraryIdCardActionButton(ManageActionButton): 66 grok.order(10) 67 grok.context(ICustomStudent) 68 grok.view(StudentBaseDisplayFormPage) 69 grok.require('waeup.viewStudent') 70 icon = 'actionicon_pdf.png' 71 text = _('Download Library Id Card') 72 target = 'lib_idcard.pdf' 73 74 @property 75 def target_url(self): 76 if self.context.library: 77 return self.view.url(self.view.context, self.target) 78 return 52 79 53 80 # Signature
Note: See TracChangeset for help on using the changeset viewer.