source: main/waeup.futminna/trunk/src/waeup/futminna/students/viewlets.py @ 9732

Last change on this file since 9732 was 9523, checked in by Henrik Bettermann, 12 years ago

Adjust to changes made in base package.

  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1## $Id: viewlets.py 9523 2012-11-04 10:27:40Z 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.students.viewlets import (
21    FileDisplay, FileUpload, Image)
22from waeup.kofa.students.browser import ExportPDFClearanceSlipPage
23from waeup.kofa.students.viewlets import AddPreviousPaymentActionButton
24
25from kofacustom.nigeria.interfaces import MessageFactory as _
26
27
28class AddPreviousPaymentActionButton(AddPreviousPaymentActionButton):
29
30    @property
31    def target_url(self):
32        return ''
33
34# Accepted by Institution
35
36class AcceptedByInstitutionDisplay(FileDisplay):
37    """Accepted by Institution display viewlet.
38    """
39    grok.order(19)
40    label = _(u'Accepted by Institution')
41    title = _(u'Accepted by Institution')
42    download_name = u'acc_inst'
43
44class AcceptedByInstitutionSlip(AcceptedByInstitutionDisplay):
45    grok.view(ExportPDFClearanceSlipPage)
46
47class AcceptedByInstitutionUpload(FileUpload):
48    """Accepted by Institution upload viewlet.
49    """
50    grok.order(19)
51    label = _(u'Accepted by Institution')
52    title = _(u'Accepted by Institution Scan')
53    mus = 1024 * 150
54    download_name = u'acc_inst'
55
56class AcceptedByInstitutionImage(Image):
57    """Renders Accepted by Institution scan.
58    """
59    grok.name('acc_inst')
60    download_name = u'acc_inst'
61
62# Credential
63
64class CredentialDisplay(FileDisplay):
65    """Credential display viewlet.
66    """
67    grok.order(20)
68    label = _(u'Credential')
69    title = _(u'Credential')
70    download_name = u'cred'
71
72class CredentialSlip(CredentialDisplay):
73    grok.view(ExportPDFClearanceSlipPage)
74
75class CredentialUpload(FileUpload):
76    """Credential upload viewlet.
77    """
78    grok.order(20)
79    label = _(u'Credential')
80    title = _(u'Credential')
81    mus = 1024 * 150
82    download_name = u'cred'
83
84class CredentialImage(Image):
85    """Credential scan.
86    """
87    grok.name('cred')
88    download_name = u'cred'
89
90# Student Signature
91
92class StudentSignatureDisplay(FileDisplay):
93    """Student Signature display viewlet.
94    """
95    grok.order(21)
96    label = _(u'Student Signature')
97    title = _(u'Student Signature')
98    download_name = u'signature'
99
100class StudentSignatureSlip(StudentSignatureDisplay):
101    grok.view(ExportPDFClearanceSlipPage)
102
103class StudentSignatureUpload(FileUpload):
104    """Student Signature upload viewlet.
105    """
106    grok.order(21)
107    label = _(u'Student Signature')
108    title = _(u'Student Signature')
109    mus = 1024 * 150
110    download_name = u'signature'
111
112class StudentSignatureImage(Image):
113    """Student Signature scan.
114    """
115    grok.name('signature')
116    download_name = u'signature'
117
118# JAMB Letter
119
120class JAMBLetterDisplay(FileDisplay):
121    """JAMB Letter display viewlet.
122    """
123    grok.order(23)
124    label = _(u'JAMB Letter')
125    title = _(u'JAMB Letter')
126    download_name = u'jamb_let'
127
128class JAMBLetterSlip(JAMBLetterDisplay):
129    grok.view(ExportPDFClearanceSlipPage)
130
131class JAMBLetterUpload(FileUpload):
132    """JAMB Letter upload viewlet.
133    """
134    grok.order(23)
135    label = _(u'JAMB Letter')
136    title = _(u'JAMB Letter')
137    mus = 1024 * 150
138    download_name = u'jamb_let'
139
140class JAMBLetterImage(Image):
141    """JAMB Letter scan.
142    """
143    grok.name('jamb_let')
144    download_name = u'jamb_let'
145
146# JAMB Slip
147
148class JAMBSlipDisplay(FileDisplay):
149    """JAMB Slip display viewlet.
150    """
151    grok.order(24)
152    label = _(u'JAMB Slip')
153    title = _(u'JAMB Slip')
154    download_name = u'jamb_slip'
155
156class JAMBSlipSlip(JAMBSlipDisplay):
157    grok.view(ExportPDFClearanceSlipPage)
158
159class JAMBSlipUpload(FileUpload):
160    """JAMB Slip upload viewlet.
161    """
162    grok.order(24)
163    label = _(u'JAMB Slip')
164    title = _(u'JAMB Slip')
165    mus = 1024 * 150
166    download_name = u'jamb_slip'
167
168class JAMBSlipImage(Image):
169    """JAMB Slip scan.
170    """
171    grok.name('jamb_slip')
172    download_name = u'jamb_slip'
173
174# Age Declaration
175
176class AgeDeclarationDisplay(FileDisplay):
177    """Age Declaration display viewlet.
178    """
179    grok.order(25)
180    label = _(u'Age Declaration')
181    title = _(u'Age Declaration')
182    download_name = u'age_dec'
183
184class AgeDeclarationSlip(AgeDeclarationDisplay):
185    grok.view(ExportPDFClearanceSlipPage)
186
187class AgeDeclarationUpload(FileUpload):
188    """Age Declaration upload viewlet.
189    """
190    grok.order(25)
191    label = _(u'Age Declaration')
192    title = _(u'Age Declaration')
193    mus = 1024 * 150
194    download_name = u'age_dec'
195
196class AgeDeclarationImage(Image):
197    """Age Declaration scan.
198    """
199    grok.name('age_dec')
200    download_name = u'age_dec'
Note: See TracBrowser for help on using the repository browser.