source: main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/viewlets.py @ 17388

Last change on this file since 17388 was 17388, checked in by Henrik Bettermann, 19 months ago

Do not allow students to create balance payment tickets.

  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1## $Id: viewlets.py 17388 2023-04-20 09:41:19Z henrik $
2##
3## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18
19import grok
20from waeup.kofa.interfaces import REQUESTED
21from waeup.kofa.browser.viewlets import ManageActionButton
22from kofacustom.edocons.students.interfaces import (
23    ICustomStudentStudyCourse, ICustomStudentStudyLevel)
24from waeup.kofa.students.fileviewlets import (
25    StudentFileDisplay, StudentFileUpload, StudentImage)
26from waeup.kofa.students.browser import (
27    ExportPDFClearanceSlip, StudyCourseDisplayFormPage,
28    StudyLevelDisplayFormPage)
29from waeup.kofa.students.viewlets import (
30    AddPreviousPaymentActionButton, AddBalancePaymentActionButton,
31    StudentPersonalEditActionButton)
32
33from kofacustom.nigeria.interfaces import MessageFactory as _
34
35class AddBalancePaymentActionButton(AddBalancePaymentActionButton):
36    grok.require('waeup.manageStudent')
37
38# Medical Certificate
39
40class MedicalCertificateDisplay(StudentFileDisplay):
41    """Medical Certificate display viewlet.
42    """
43    grok.order(19)
44    label = _(u'Medical Certificate')
45    title = _(u'Medical Certificate')
46    download_name = u'medcert'
47
48class MedicalCertificateSlip(MedicalCertificateDisplay):
49    grok.view(ExportPDFClearanceSlip)
50
51class MedicalCertificateUpload(StudentFileUpload):
52    """Medical Certificate upload viewlet.
53    """
54    grok.order(19)
55    label = _(u'Medical Certificate (attach blood group, genotype and chest X-ray in one pdf file)')
56    title = _(u'Medical Certificate Scan')
57    download_name = u'medcert'
58
59class MedicalCertificateImage(StudentImage):
60    """Renders Medical Certificate scan.
61    """
62    grok.name('medcert')
63    download_name = u'medcert'
64
65# Specification for Female Uniform
66
67class SpecificationFemaleUniformDisplay(StudentFileDisplay):
68    """Specification for Female Uniform display viewlet.
69    """
70    grok.order(20)
71    label = _(u'Specification for Female Uniform')
72    title = _(u'Specification for Female Uniform')
73    download_name = u'femuniform'
74
75class SpecificationFemaleUniformSlip(SpecificationFemaleUniformDisplay):
76    grok.view(ExportPDFClearanceSlip)
77
78class SpecificationFemaleUniformUpload(StudentFileUpload):
79    """Specification for Female Uniform upload viewlet.
80    """
81    grok.order(20)
82    label = _(u'Specification for Female Uniform')
83    title = _(u'Specification for Female Uniform')
84    download_name = u'femuniform'
85
86class SpecificationFemaleUniformImage(StudentImage):
87    """Renders Medical Certificate scan.
88    """
89    grok.name('femuniform')
90    download_name = u'femuniform'
91   
92# Hostel Form
93
94class HostelFormDisplay(StudentFileDisplay):
95    """Hostel Form display viewlet.
96    """
97    grok.order(21)
98    label = _(u'Hostel Form')
99    title = _(u'Hostel Form')
100    download_name = u'hostel'
101
102class HostelFormSlip(HostelFormDisplay):
103    grok.view(ExportPDFClearanceSlip)
104
105class HostelFormUpload(StudentFileUpload):
106    """Hostel Form upload viewlet.
107    """
108    grok.order(22)
109    label = _(u'Hostel Form (for those in hostel only)')
110    title = _(u'Hostel Form Scan')
111    download_name = u'hostel'
112
113class HostelFormImage(StudentImage):
114    """Renders Hostel Form scan.
115    """
116    grok.name('hostel')
117    download_name = u'hostel'
118
119
120# Renouncement of Cult
121
122class RenouncementCultDisplay(StudentFileDisplay):
123    """Renouncement of Cult display viewlet.
124    """
125    grok.order(23)
126    label = _(u'Renouncement of Cult')
127    title = _(u'Renouncement of Cult')
128    download_name = u'cult'
129
130class RenouncementCultSlip(RenouncementCultDisplay):
131    grok.view(ExportPDFClearanceSlip)
132
133class RenouncementCultUpload(StudentFileUpload):
134    """Renouncement of Cult upload viewlet.
135    """
136    grok.order(23)
137    label = _(u'Renouncement of Cult')
138    title = _(u'Renouncement of Cult Scan')
139    download_name = u'cult'
140
141class RenouncementCultImage(StudentImage):
142    """Renders Renouncement of Cult scan.
143    """
144    grok.name('cult')
145    download_name = u'cult'
146
147
148# Letter of Sponsorship
149
150class LetterSponsorshipDisplay(StudentFileDisplay):
151    """Letter of Sponsorship display viewlet.
152    """
153    grok.order(24)
154    label = _(u'Letter of Sponsorship')
155    title = _(u'Letter of Sponsorship')
156    download_name = u'sponsor'
157
158class LetterSponsorshipSlip(LetterSponsorshipDisplay):
159    grok.view(ExportPDFClearanceSlip)
160
161class LetterSponsorshipUpload(StudentFileUpload):
162    """Letter of Sponsorship upload viewlet.
163    """
164    grok.order(24)
165    label = _(u'Letter of Sponsorship')
166    title = _(u'Letter of Sponsorship Scan')
167    download_name = u'sponsor'
168
169class LetterSponsorshipImage(StudentImage):
170    """Renders Letter of Sponsorship scan.
171    """
172    grok.name('sponsor')
173    download_name = u'sponsor'
Note: See TracBrowser for help on using the repository browser.