- Timestamp:
- 13 Apr 2015, 14:55:28 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
r12452 r12855 18 18 19 19 import grok 20 from waeup.kofa.interfaces import REQUESTED 20 from waeup.kofa.interfaces import REQUESTED, REGISTERED 21 21 from waeup.kofa.browser.viewlets import ManageActionButton 22 22 from waeup.uniben.students.interfaces import ( … … 44 44 return self.view.url(self.view.context, self.target) 45 45 return False 46 47 class CourseRegistrationSlipActionButton(ManageActionButton): 48 grok.order(5) 49 grok.context(ICustomStudentStudyLevel) 50 grok.view(StudyLevelDisplayFormPage) 51 grok.require('waeup.viewStudent') 52 icon = 'actionicon_pdf.png' 53 text = _('Download course registration slip') 54 target = 'course_registration_slip.pdf' 55 56 @property 57 def target_url(self): 58 is_current = self.context.__parent__.is_current 59 if not is_current: 60 return '' 61 if self.context.student.state != REGISTERED \ 62 or self.context.student.current_level != self.context.level: 63 return '' 64 return self.view.url(self.view.context, self.target) 46 65 47 66 class CourseResultSlipActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.