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

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

Fix download_name.

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