Changeset 10818 for main/kofacustom.ekodisco/trunk
- Timestamp:
- 29 Nov 2013, 11:35:34 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/students/viewlets.py
r10812 r10818 17 17 ## 18 18 19 import grok 20 from zope.component import getUtility 21 from waeup.kofa.interfaces import IExtFileStore 22 19 23 from waeup.kofa.students.viewlets import ( 20 24 StudentsTab, AdmissionSlipActionButton, StudentManageClearanceLink, 21 25 StudentManagePersonalLink, StudentManageAccommodationLink, 22 26 AddBalancePaymentActionButton, 23 AddPreviousPaymentActionButton) 27 AddPreviousPaymentActionButton, 28 MyStudentDataTab) 24 29 25 30 from kofacustom.ekodisco.interfaces import MessageFactory as _ 26 31 27 class CustomStudentsTab(StudentsTab):28 """Students tab in primary navigation does not show up.29 """30 31 #@property32 #def link_target(self):33 # return None34 32 35 33 class AdmissionSlipActionButton(AdmissionSlipActionButton): … … 50 48 class CustomAddPreviousPaymentActionButton(AddPreviousPaymentActionButton): 51 49 target = '' 50 51 class CustomMyStudentDataTab(MyStudentDataTab): 52 """MyData dropdown tab in primary navigation. 53 """ 54 55 @property 56 def targets(self): 57 student = grok.getSite()['students'][self.request.principal.id] 58 student_url = self.view.url(student) 59 app_slip = getUtility(IExtFileStore).getFileByContext( 60 student, 'application_slip') 61 targets = [] 62 if app_slip: 63 targets = [{'url':student_url + '/application_slip', 64 'title':_('Subscription Slip')},] 65 targets += [ 66 {'url':student_url, 'title':'Base Data'}, 67 {'url':student_url + '/studycourse', 'title':_('Main Contract')}, 68 {'url':student_url + '/payments', 'title':_('Payments')}, 69 {'url':student_url + '/history', 'title':_('History')}, 70 ] 71 return targets
Note: See TracChangeset for help on using the changeset viewer.