source: main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/viewlets.py @ 15660

Last change on this file since 15660 was 15654, checked in by Henrik Bettermann, 5 years ago

Replace file viewlets.

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1## $Id: viewlets.py 15654 2019-10-09 10:10:23Z 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.iuokada.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)
29
30from kofacustom.nigeria.interfaces import MessageFactory as _
31
32# Signature
33
34class SignatureDisplay(StudentFileDisplay):
35    """Signature display viewlet.
36    """
37    grok.order(2)
38    label = _(u'Signature')
39    title = _(u'Signature Scan')
40    download_name = u'signature'
41
42class SignatureSlip(SignatureDisplay):
43    grok.view(ExportPDFClearanceSlip)
44
45class SignatureUpload(StudentFileUpload):
46    """Signature upload viewlet.
47    """
48    grok.order(2)
49    label = _(u'Signature')
50    title = _(u'Signature Scan')
51    download_name = u'signature'
52    tab_redirect = '?tab2'
53
54class SignatureImage(StudentImage):
55    """Renders acceptance letter scan.
56    """
57    grok.name('signature')
58    download_name = u'signature'
59
60# JAMB Result
61
62class JAMBResultDisplay(StudentFileDisplay):
63    """JAMB Result display viewlet.
64    """
65    grok.order(9)
66    label = _(u'JAMB Result')
67    title = _(u'JAMB Result')
68    download_name = u'jamb'
69
70class JAMBResultSlip(JAMBResultDisplay):
71    grok.view(ExportPDFClearanceSlip)
72
73class JAMBResultUpload(StudentFileUpload):
74    """JAMB Result upload viewlet.
75    """
76    grok.order(9)
77    label = _(u'JAMB Result')
78    title = _(u'JAMB Result Scan')
79    download_name = u'jamb'
80
81class JAMBResultImage(StudentImage):
82    """Renders JAMB Result scan.
83    """
84    grok.name('jamb')
85    download_name = u'jamb'
86
Note: See TracBrowser for help on using the repository browser.