1 | ## $Id: viewlets.py 14881 2017-10-26 07:05: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 | |
---|
19 | import grok |
---|
20 | from zope.component import getUtility |
---|
21 | from waeup.kofa.browser.viewlets import ManageActionButton |
---|
22 | from waeup.kofa.students.interfaces import IStudentsUtils |
---|
23 | from waeup.kofa.students.fileviewlets import ( |
---|
24 | StudentFileDisplay, StudentFileUpload, StudentImage) |
---|
25 | from waeup.kofa.students.browser import ExportPDFClearanceSlip |
---|
26 | |
---|
27 | from kofacustom.nigeria.students.interfaces import INigeriaStudent |
---|
28 | from kofacustom.nigeria.students.browser import NigeriaStudentBaseDisplayFormPage |
---|
29 | from kofacustom.nigeria.interfaces import MessageFactory as _ |
---|
30 | |
---|
31 | def show_viewlet(viewlet): |
---|
32 | students_utils = getUtility(IStudentsUtils) |
---|
33 | if viewlet.__name__ in students_utils.SKIP_UPLOAD_VIEWLETS: |
---|
34 | return False |
---|
35 | cm = getattr(viewlet.context,'current_mode', None) |
---|
36 | if cm is not None and cm.startswith('pg'): |
---|
37 | return True |
---|
38 | return False |
---|
39 | |
---|
40 | # Financial Clearance Officer buttons |
---|
41 | |
---|
42 | class StudentFinanciallyClearActionButton(ManageActionButton): |
---|
43 | grok.order(10) |
---|
44 | grok.context(INigeriaStudent) |
---|
45 | grok.view(NigeriaStudentBaseDisplayFormPage) |
---|
46 | grok.require('waeup.clearStudentFinancially') |
---|
47 | text = _('Clear student financially') |
---|
48 | target = 'clear_financially' |
---|
49 | icon = 'actionicon_accept.png' |
---|
50 | |
---|
51 | @property |
---|
52 | def target_url(self): |
---|
53 | if self.context.financially_cleared_by: |
---|
54 | return '' |
---|
55 | return self.view.url(self.view.context, self.target) |
---|
56 | |
---|
57 | class StudentWithdrawFinancialClearanceActionButton(ManageActionButton): |
---|
58 | grok.order(11) |
---|
59 | grok.context(INigeriaStudent) |
---|
60 | grok.view(NigeriaStudentBaseDisplayFormPage) |
---|
61 | grok.require('waeup.clearStudentFinancially') |
---|
62 | text = _('Withdraw financial clearance') |
---|
63 | target = 'withdraw_financial_clearance' |
---|
64 | icon = 'actionicon_reject.png' |
---|
65 | |
---|
66 | @property |
---|
67 | def target_url(self): |
---|
68 | if not self.context.financially_cleared_by: |
---|
69 | return '' |
---|
70 | return self.view.url(self.view.context, self.target) |
---|
71 | |
---|
72 | class FinancialClearanceSlipActionButton(ManageActionButton): |
---|
73 | grok.order(12) |
---|
74 | grok.context(INigeriaStudent) |
---|
75 | grok.view(NigeriaStudentBaseDisplayFormPage) |
---|
76 | grok.require('waeup.viewStudent') |
---|
77 | text = _('Download fee payment history') |
---|
78 | target = 'fee_payment_history.pdf' |
---|
79 | icon = 'actionicon_pdf.png' |
---|
80 | |
---|
81 | # Acceptance Letter |
---|
82 | |
---|
83 | class AcceptanceLetterDisplay(StudentFileDisplay): |
---|
84 | """Acceptance Letter display viewlet. |
---|
85 | """ |
---|
86 | grok.order(2) |
---|
87 | label = _(u'Acceptance Letter') |
---|
88 | title = _(u'Acceptance Letter Scan') |
---|
89 | download_name = u'acc_let' |
---|
90 | |
---|
91 | class AcceptanceLetterSlip(AcceptanceLetterDisplay): |
---|
92 | grok.view(ExportPDFClearanceSlip) |
---|
93 | |
---|
94 | class AcceptanceLetterUpload(StudentFileUpload): |
---|
95 | """AcceptanceLetter upload viewlet. |
---|
96 | """ |
---|
97 | grok.order(2) |
---|
98 | label = _(u'Acceptance Letter') |
---|
99 | title = _(u'Acceptance Letter Scan') |
---|
100 | mus = 1024 * 250 |
---|
101 | download_name = u'acc_let' |
---|
102 | tab_redirect = '?tab2' |
---|
103 | |
---|
104 | class AcceptanceLetterImage(StudentImage): |
---|
105 | """Renders acceptance letter scan. |
---|
106 | """ |
---|
107 | grok.name('acc_let') |
---|
108 | download_name = u'acc_let' |
---|
109 | |
---|
110 | # LGA Identification |
---|
111 | |
---|
112 | class LGAIdentificationDisplay(StudentFileDisplay): |
---|
113 | """LGA Identification display viewlet. |
---|
114 | """ |
---|
115 | grok.order(3) |
---|
116 | label = _(u'LGA Identification') |
---|
117 | title = _(u'LGA Identification Scan') |
---|
118 | download_name = u'lga_ident' |
---|
119 | |
---|
120 | class LGAIdentificationSlip(LGAIdentificationDisplay): |
---|
121 | grok.view(ExportPDFClearanceSlip) |
---|
122 | |
---|
123 | class LGAIdentificationUpload(StudentFileUpload): |
---|
124 | """LGA Identification upload viewlet. |
---|
125 | """ |
---|
126 | grok.order(3) |
---|
127 | label = _(u'LGA Identification') |
---|
128 | title = _(u'LGA Identification Scan') |
---|
129 | mus = 1024 * 250 |
---|
130 | download_name = u'lga_ident' |
---|
131 | |
---|
132 | class LGAIdentificationImage(StudentImage): |
---|
133 | """Renders LGA Identification scan. |
---|
134 | """ |
---|
135 | grok.name('lga_ident') |
---|
136 | download_name = u'lga_ident' |
---|
137 | |
---|
138 | # First Sitting Result |
---|
139 | |
---|
140 | class FirstSittingResultDisplay(StudentFileDisplay): |
---|
141 | """First Sitting Result display viewlet. |
---|
142 | """ |
---|
143 | grok.order(4) |
---|
144 | label = _(u'First Sitting Result') |
---|
145 | title = _(u'First Sitting Result') |
---|
146 | download_name = u'fst_sit_scan' |
---|
147 | |
---|
148 | class FirstSittingResultSlip(FirstSittingResultDisplay): |
---|
149 | grok.view(ExportPDFClearanceSlip) |
---|
150 | |
---|
151 | class FirstSittingResultUpload(StudentFileUpload): |
---|
152 | """First Sitting Result upload viewlet. |
---|
153 | """ |
---|
154 | grok.order(4) |
---|
155 | label = _(u'First Sitting Result') |
---|
156 | title = _(u'First Sitting Result Scan') |
---|
157 | mus = 1024 * 250 |
---|
158 | download_name = u'fst_sit_scan' |
---|
159 | |
---|
160 | class FirstSittingResultImage(StudentImage): |
---|
161 | """Renders First Sitting Result scan. |
---|
162 | """ |
---|
163 | grok.name('fst_sit_scan') |
---|
164 | download_name = u'fst_sit_scan' |
---|
165 | |
---|
166 | # Second Sitting Result |
---|
167 | |
---|
168 | class SecondSittingResultDisplay(StudentFileDisplay): |
---|
169 | """Second Sitting Result display viewlet. |
---|
170 | """ |
---|
171 | grok.order(5) |
---|
172 | label = _(u'Second Sitting Result') |
---|
173 | title = _(u'Second Sitting Result') |
---|
174 | download_name = u'scd_sit_scan' |
---|
175 | |
---|
176 | class SecondSittingResultSlip(SecondSittingResultDisplay): |
---|
177 | grok.view(ExportPDFClearanceSlip) |
---|
178 | |
---|
179 | class SecondSittingResultUpload(StudentFileUpload): |
---|
180 | """Second Sitting Result upload viewlet. |
---|
181 | """ |
---|
182 | grok.order(5) |
---|
183 | label = _(u'Second Sitting Result') |
---|
184 | title = _(u'Second Sitting Result Scan') |
---|
185 | mus = 1024 * 250 |
---|
186 | download_name = u'scd_sit_scan' |
---|
187 | |
---|
188 | class SecondSittingResultImage(StudentImage): |
---|
189 | """Renders Second Sitting Result scan. |
---|
190 | """ |
---|
191 | grok.name('scd_sit_scan') |
---|
192 | download_name = u'scd_sit_scan' |
---|
193 | |
---|
194 | # Higher Qualification Result |
---|
195 | |
---|
196 | class HigherQualificationResultDisplay(StudentFileDisplay): |
---|
197 | """Higher Qualification Result display viewlet. |
---|
198 | """ |
---|
199 | grok.order(6) |
---|
200 | label = _(u'Higher Qualification Result') |
---|
201 | title = _(u'Higher Qualification Result') |
---|
202 | download_name = u'hq_scan' |
---|
203 | |
---|
204 | class HigherQualificationResultSlip(HigherQualificationResultDisplay): |
---|
205 | grok.view(ExportPDFClearanceSlip) |
---|
206 | |
---|
207 | class HigherQualificationResultUpload(StudentFileUpload): |
---|
208 | """Higher Qualification Result upload viewlet. |
---|
209 | """ |
---|
210 | grok.order(6) |
---|
211 | label = _(u'Higher Qualification Result') |
---|
212 | title = _(u'Higher Qualification Result Scan') |
---|
213 | mus = 1024 * 250 |
---|
214 | download_name = u'hq_scan' |
---|
215 | |
---|
216 | class HigherQualificationResultImage(StudentImage): |
---|
217 | """Renders Higher Qualification Result scan. |
---|
218 | """ |
---|
219 | grok.name('hq_scan') |
---|
220 | download_name = u'hq_scan' |
---|
221 | |
---|
222 | # 2nd Higher Qualification Result (PG Students only) |
---|
223 | |
---|
224 | class SecondHigherQualificationResultDisplay(StudentFileDisplay): |
---|
225 | """Second Higher Qualification Result display viewlet. |
---|
226 | """ |
---|
227 | grok.order(7) |
---|
228 | label = _(u'Second Higher Qualification Result') |
---|
229 | title = _(u'Second Higher Qualification Result') |
---|
230 | download_name = u'hq_scan2' |
---|
231 | |
---|
232 | class SecondHigherQualificationResultSlip(SecondHigherQualificationResultDisplay): |
---|
233 | grok.view(ExportPDFClearanceSlip) |
---|
234 | |
---|
235 | class SecondHigherQualificationResultUpload(StudentFileUpload): |
---|
236 | """Second Higher Qualification Result upload viewlet. |
---|
237 | """ |
---|
238 | grok.order(7) |
---|
239 | label = _(u'Second Higher Qualification Result') |
---|
240 | title = _(u'Second Higher Qualification Result Scan') |
---|
241 | mus = 1024 * 250 |
---|
242 | download_name = u'hq_scan2' |
---|
243 | |
---|
244 | @property |
---|
245 | def show_viewlet(self): |
---|
246 | return show_viewlet(self) |
---|
247 | |
---|
248 | class SecondHigherQualificationResultImage(StudentImage): |
---|
249 | """Renders Second Higher Qualification Result scan. |
---|
250 | """ |
---|
251 | grok.name('hq_scan2') |
---|
252 | download_name = u'hq_scan2' |
---|
253 | |
---|
254 | # Advanced Level Result |
---|
255 | |
---|
256 | class AdvancedLevelResultDisplay(StudentFileDisplay): |
---|
257 | """Advanced Level Result display viewlet. |
---|
258 | """ |
---|
259 | grok.order(8) |
---|
260 | label = _(u'Advanced Level Result') |
---|
261 | title = _(u'Advanced Level Result') |
---|
262 | download_name = u'alr_scan' |
---|
263 | |
---|
264 | class AdvancedLevelResultSlip(AdvancedLevelResultDisplay): |
---|
265 | grok.view(ExportPDFClearanceSlip) |
---|
266 | |
---|
267 | class AdvancedLevelResultUpload(StudentFileUpload): |
---|
268 | """Advanced Level Result upload viewlet. |
---|
269 | """ |
---|
270 | grok.order(8) |
---|
271 | label = _(u'Advanced Level Result') |
---|
272 | title = _(u'Advanced Level Result Scan') |
---|
273 | mus = 1024 * 250 |
---|
274 | download_name = u'alr_scan' |
---|
275 | |
---|
276 | class AdvancedLevelResultImage(StudentImage): |
---|
277 | """Renders Advanced Level Result scan. |
---|
278 | """ |
---|
279 | grok.name('alr_scan') |
---|
280 | download_name = u'alr_scan' |
---|
281 | |
---|
282 | # Certificate |
---|
283 | |
---|
284 | class CertificateDisplay(StudentFileDisplay): |
---|
285 | """Certificate display viewlet. |
---|
286 | """ |
---|
287 | grok.order(9) |
---|
288 | label = _(u'Certificate') |
---|
289 | title = _(u'Certificate') |
---|
290 | download_name = u'cert' |
---|
291 | |
---|
292 | class CertificateSlip(CertificateDisplay): |
---|
293 | grok.view(ExportPDFClearanceSlip) |
---|
294 | |
---|
295 | class CertificateUpload(StudentFileUpload): |
---|
296 | """Certificate upload viewlet. |
---|
297 | """ |
---|
298 | grok.order(9) |
---|
299 | label = _(u'Certificate') |
---|
300 | title = _(u'Certificate Scan') |
---|
301 | mus = 1024 * 250 |
---|
302 | download_name = u'cert' |
---|
303 | |
---|
304 | class CertificateImage(StudentImage): |
---|
305 | """Renders Certificate scan. |
---|
306 | """ |
---|
307 | grok.name('cert') |
---|
308 | download_name = u'cert' |
---|
309 | |
---|
310 | # Second Certificate (PG Students only) |
---|
311 | |
---|
312 | class SecondCertificateDisplay(StudentFileDisplay): |
---|
313 | """ Second Certificate display viewlet. |
---|
314 | """ |
---|
315 | grok.order(10) |
---|
316 | label = _(u'Second Certificate') |
---|
317 | title = _(u'Second Certificate') |
---|
318 | download_name = u'cert2' |
---|
319 | |
---|
320 | class SecondCertificateSlip(SecondCertificateDisplay): |
---|
321 | grok.view(ExportPDFClearanceSlip) |
---|
322 | |
---|
323 | class SecondCertificateUpload(StudentFileUpload): |
---|
324 | """Second Certificate upload viewlet. |
---|
325 | """ |
---|
326 | grok.order(10) |
---|
327 | label = _(u'Second Certificate') |
---|
328 | title = _(u'Second Certificate Scan') |
---|
329 | mus = 1024 * 250 |
---|
330 | download_name = u'cert2' |
---|
331 | |
---|
332 | @property |
---|
333 | def show_viewlet(self): |
---|
334 | return show_viewlet(self) |
---|
335 | |
---|
336 | class SecondCertificateImage(StudentImage): |
---|
337 | """Renders Second Certificate scan. |
---|
338 | """ |
---|
339 | grok.name('cert2') |
---|
340 | download_name = u'cert2' |
---|
341 | |
---|
342 | # Third Certificate (PG Students only) |
---|
343 | |
---|
344 | class ThirdCertificateDisplay(StudentFileDisplay): |
---|
345 | """ Third Certificate display viewlet. |
---|
346 | """ |
---|
347 | grok.order(11) |
---|
348 | label = _(u'Third Certificate') |
---|
349 | title = _(u'Third Certificate') |
---|
350 | download_name = u'cert3' |
---|
351 | |
---|
352 | class ThirdCertificateSlip(ThirdCertificateDisplay): |
---|
353 | grok.view(ExportPDFClearanceSlip) |
---|
354 | |
---|
355 | class ThirdCertificateUpload(StudentFileUpload): |
---|
356 | """Third Certificate upload viewlet. |
---|
357 | """ |
---|
358 | grok.order(11) |
---|
359 | label = _(u'Third Certificate') |
---|
360 | title = _(u'Third Certificate Scan') |
---|
361 | mus = 1024 * 250 |
---|
362 | download_name = u'cert3' |
---|
363 | |
---|
364 | @property |
---|
365 | def show_viewlet(self): |
---|
366 | return show_viewlet(self) |
---|
367 | |
---|
368 | class ThirdCertificateImage(StudentImage): |
---|
369 | """Renders Third Certificate scan. |
---|
370 | """ |
---|
371 | grok.name('cert3') |
---|
372 | download_name = u'cert3' |
---|
373 | |
---|
374 | # Evidence of Name |
---|
375 | |
---|
376 | class EvidenceNameDisplay(StudentFileDisplay): |
---|
377 | """Evidence of Name display viewlet. |
---|
378 | """ |
---|
379 | grok.order(12) |
---|
380 | label = _(u'Evidence of Name') |
---|
381 | title = _(u'Evidence of Name') |
---|
382 | download_name = u'evid' |
---|
383 | |
---|
384 | class EvidenceNameSlip(EvidenceNameDisplay): |
---|
385 | grok.view(ExportPDFClearanceSlip) |
---|
386 | |
---|
387 | class EvidenceNameUpload(StudentFileUpload): |
---|
388 | """Evidence of Name upload viewlet. |
---|
389 | """ |
---|
390 | grok.order(12) |
---|
391 | label = _(u'Evidence of Name') |
---|
392 | title = _(u'Evidence of Name Scan') |
---|
393 | mus = 1024 * 250 |
---|
394 | download_name = u'evid' |
---|
395 | |
---|
396 | class EvidenceNameImage(StudentImage): |
---|
397 | """Renders Evidence of Name scan. |
---|
398 | """ |
---|
399 | grok.name('evid') |
---|
400 | download_name = u'evid' |
---|
401 | |
---|
402 | # Result Statement |
---|
403 | |
---|
404 | class ResultStatementDisplay(StudentFileDisplay): |
---|
405 | """Result Statement display viewlet. |
---|
406 | """ |
---|
407 | grok.order(13) |
---|
408 | label = _(u'Result Statement') |
---|
409 | title = _(u'Result Statement') |
---|
410 | download_name = u'res_stat' |
---|
411 | |
---|
412 | class ResultStatementSlip(ResultStatementDisplay): |
---|
413 | grok.view(ExportPDFClearanceSlip) |
---|
414 | |
---|
415 | class ResultStatementUpload(StudentFileUpload): |
---|
416 | """Result Statement upload viewlet. |
---|
417 | """ |
---|
418 | grok.order(13) |
---|
419 | label = _(u'Result Statement') |
---|
420 | title = _(u'Result Statement Scan') |
---|
421 | mus = 1024 * 250 |
---|
422 | download_name = u'res_stat' |
---|
423 | |
---|
424 | class ResultStatementImage(StudentImage): |
---|
425 | """Renders Result Statement scan. |
---|
426 | """ |
---|
427 | grok.name('res_stat') |
---|
428 | download_name = u'res_stat' |
---|
429 | |
---|
430 | # Referee Letter |
---|
431 | |
---|
432 | class RefereeLetterDisplay(StudentFileDisplay): |
---|
433 | """Referee Letter display viewlet. |
---|
434 | """ |
---|
435 | grok.order(14) |
---|
436 | label = _(u'Guarantor/Referee Letter') |
---|
437 | title = _(u'Guarantor/Referee Letter') |
---|
438 | download_name = u'ref_let' |
---|
439 | |
---|
440 | class RefereeLetterSlip(RefereeLetterDisplay): |
---|
441 | grok.view(ExportPDFClearanceSlip) |
---|
442 | |
---|
443 | class RefereeLetterUpload(StudentFileUpload): |
---|
444 | """Referee Letter upload viewlet. |
---|
445 | """ |
---|
446 | grok.order(14) |
---|
447 | label = _(u'Guarantor/Referee Letter') |
---|
448 | title = _(u'Guarantor/Referee Letter Scan') |
---|
449 | mus = 1024 * 250 |
---|
450 | download_name = u'ref_let' |
---|
451 | |
---|
452 | class RefereeLetterImage(StudentImage): |
---|
453 | """Renders Referee Letter scan. |
---|
454 | """ |
---|
455 | grok.name('ref_let') |
---|
456 | download_name = u'ref_let' |
---|
457 | |
---|
458 | # Second Referee Letter (PG Students only) |
---|
459 | |
---|
460 | class SecondRefereeLetterDisplay(StudentFileDisplay): |
---|
461 | """Second Referee Letter display viewlet. |
---|
462 | """ |
---|
463 | grok.order(15) |
---|
464 | label = _(u'Second Referee Letter') |
---|
465 | title = _(u'Second Referee Letter') |
---|
466 | download_name = u'ref_let2' |
---|
467 | |
---|
468 | class SecondRefereeLetterSlip(SecondRefereeLetterDisplay): |
---|
469 | grok.view(ExportPDFClearanceSlip) |
---|
470 | |
---|
471 | class SecondRefereeLetterUpload(StudentFileUpload): |
---|
472 | """Referee Letter upload viewlet. |
---|
473 | """ |
---|
474 | grok.order(15) |
---|
475 | label = _(u'Second Referee Letter') |
---|
476 | title = _(u'Second Referee Letter Scan') |
---|
477 | mus = 1024 * 250 |
---|
478 | download_name = u'ref_let2' |
---|
479 | |
---|
480 | @property |
---|
481 | def show_viewlet(self): |
---|
482 | return show_viewlet(self) |
---|
483 | |
---|
484 | class SecondRefereeLetterImage(StudentImage): |
---|
485 | """Renders Referee Letter scan. |
---|
486 | """ |
---|
487 | grok.name('ref_let2') |
---|
488 | download_name = u'ref_let2' |
---|
489 | |
---|
490 | # Third Referee Letter (PG Students only) |
---|
491 | |
---|
492 | class ThirdRefereeLetterDisplay(StudentFileDisplay): |
---|
493 | """Third Referee Letter display viewlet. |
---|
494 | """ |
---|
495 | grok.order(16) |
---|
496 | label = _(u'Third Referee Letter') |
---|
497 | title = _(u'Third Referee Letter') |
---|
498 | download_name = u'ref_let3' |
---|
499 | |
---|
500 | class ThirdRefereeLetterSlip(ThirdRefereeLetterDisplay): |
---|
501 | grok.view(ExportPDFClearanceSlip) |
---|
502 | |
---|
503 | class ThirdRefereeLetterUpload(StudentFileUpload): |
---|
504 | """Referee Letter upload viewlet. |
---|
505 | """ |
---|
506 | grok.order(16) |
---|
507 | label = _(u'Third Referee Letter') |
---|
508 | title = _(u'Third Referee Letter Scan') |
---|
509 | mus = 1024 * 250 |
---|
510 | download_name = u'ref_let3' |
---|
511 | |
---|
512 | @property |
---|
513 | def show_viewlet(self): |
---|
514 | return show_viewlet(self) |
---|
515 | |
---|
516 | class ThirdRefereeLetterImage(StudentImage): |
---|
517 | """Renders Referee Letter scan. |
---|
518 | """ |
---|
519 | grok.name('ref_let3') |
---|
520 | download_name = u'ref_let3' |
---|
521 | |
---|
522 | # Affidavit (former Statutory Declaration) of Good Conduct |
---|
523 | |
---|
524 | class StatutoryDeclarationDisplay(StudentFileDisplay): |
---|
525 | """Statutory Declaration of Good Conduct display viewlet. |
---|
526 | """ |
---|
527 | grok.order(17) |
---|
528 | label = _(u'Affidavit of Good Conduct') |
---|
529 | title = _(u'Affidavit of Good Conduct') |
---|
530 | download_name = u'stat_dec' |
---|
531 | |
---|
532 | class StatutoryDeclarationSlip(StatutoryDeclarationDisplay): |
---|
533 | grok.view(ExportPDFClearanceSlip) |
---|
534 | |
---|
535 | class StatutoryDeclarationUpload(StudentFileUpload): |
---|
536 | """Statutory Declaration of Good Conduct upload viewlet. |
---|
537 | """ |
---|
538 | grok.order(17) |
---|
539 | label = _(u'Affidavit of Good Conduct') |
---|
540 | title = _(u'Affidavit of Good Conduct Scan') |
---|
541 | mus = 1024 * 250 |
---|
542 | download_name = u'stat_dec' |
---|
543 | |
---|
544 | class StatutoryDeclarationImage(StudentImage): |
---|
545 | """Renders Affidavit of Good Conduct scan. |
---|
546 | """ |
---|
547 | grok.name('stat_dec') |
---|
548 | download_name = u'stat_dec' |
---|
549 | |
---|
550 | # Letter of Admission (PG Students only) |
---|
551 | |
---|
552 | class LetterAdmissionDisplay(StudentFileDisplay): |
---|
553 | """Letter of Admission display viewlet. |
---|
554 | """ |
---|
555 | grok.order(18) |
---|
556 | label = _(u'Letter of Admission') |
---|
557 | title = _(u'Letter of Admission') |
---|
558 | download_name = u'admission_let' |
---|
559 | |
---|
560 | class LetterAdmissionSlip(LetterAdmissionDisplay): |
---|
561 | grok.view(ExportPDFClearanceSlip) |
---|
562 | |
---|
563 | class LetterAdmissionUpload(StudentFileUpload): |
---|
564 | """Letter of Admission upload viewlet. |
---|
565 | """ |
---|
566 | grok.order(18) |
---|
567 | label = _(u'Letter of Admission') |
---|
568 | title = _(u'Letter of Admission Scan') |
---|
569 | mus = 1024 * 250 |
---|
570 | download_name = u'admission_let' |
---|
571 | |
---|
572 | @property |
---|
573 | def show_viewlet(self): |
---|
574 | return show_viewlet(self) |
---|
575 | |
---|
576 | class LetterAdmissionImage(StudentImage): |
---|
577 | """Renders Letter of Admission scan. |
---|
578 | """ |
---|
579 | grok.name('admission_let') |
---|
580 | download_name = u'admission_let' |
---|