source: main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py @ 9382

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

Add file upload viewlets.

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1## $Id: viewlets.py 9382 2012-10-22 07:43:24Z 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# JAMB Letter
28
29class JAMBLetterDisplay(FileDisplay):
30    """JAMB Letter display viewlet.
31    """
32    grok.order(19)
33    label = _(u'JAMB Letter')
34    title = _(u'JAMB Letter')
35    download_name = u'cert'
36
37class JAMBLetterSlip(JAMBLetterDisplay):
38    grok.view(ExportPDFClearanceSlipPage)
39
40class JAMBLetterUpload(FileUpload):
41    """JAMB Letter upload viewlet.
42    """
43    grok.order(19)
44    label = _(u'JAMB Letter')
45    title = _(u'JAMB Letter Scan')
46    mus = 1024 * 150
47    download_name = u'cert'
48
49class JAMBLetterImage(Image):
50    """Renders JAMB Letter scan.
51    """
52    grok.name('cert')
53    download_name = u'cert'
54
55# Affidavit of Non-Membership of Secret Cults
56
57class SecrCultsStatementDisplay(FileDisplay):
58    """Affidavit of Non-Membership of Secret Cults display viewlet.
59    """
60    grok.order(20)
61    label = _(u'Affidavit of Non-Membership of Secret Cults')
62    title = _(u'Affidavit of Non-Membership of Secret Cults')
63    download_name = u'secr_cults'
64
65class SecrCultsStatementSlip(SecrCultsStatementDisplay):
66    grok.view(ExportPDFClearanceSlipPage)
67
68class SecrCultsStatementUpload(FileUpload):
69    """Affidavit of Non-Membership of Secret Cults upload viewlet.
70    """
71    grok.order(20)
72    label = _(u'Affidavit of Non-Membership of Secret Cults')
73    title = _(u'Affidavit of Non-Membership of Secret Cults Scan')
74    mus = 1024 * 150
75    download_name = u'secr_cults'
76
77class ResultStatementImage(Image):
78    """Renders Affidavit of Non-Membership of Secret Cults scan.
79    """
80    grok.name('secr_cults')
81    download_name = u'secr_cults'
Note: See TracBrowser for help on using the repository browser.