Changeset 15849 for main/kofacustom.iuokada/trunk/src/kofacustom
- Timestamp:
- 25 Nov 2019, 16:06:33 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/viewlets.py
r15805 r15849 19 19 import grok 20 20 from zope.component import getUtility 21 from waeup.kofa.interfaces import REQUESTED 21 from waeup.kofa.interfaces import REQUESTED, IExtFileStore 22 22 from waeup.kofa.browser.viewlets import ManageActionButton 23 23 from waeup.kofa.students.interfaces import IStudent, IStudentsUtils … … 79 79 download_name = u'signature' 80 80 81 class SignatureDownloadButton(ManageActionButton): 82 83 grok.order(12) 84 grok.context(IStudent) 85 grok.view(StudentBaseDisplayFormPage) 86 grok.require('waeup.manageStudent') 87 target = 'signature' 88 text = _('Signature') 89 icon = 'actionicon_signature.png' 90 91 @property 92 def target_url(self): 93 image = getUtility(IExtFileStore).getFileByContext( 94 self.context, attr='signature') 95 if not image: 96 return '' 97 return self.view.url(self.view.context, self.target) 98 81 99 # JAMB Result 82 100
Note: See TracChangeset for help on using the changeset viewer.