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

Last change on this file since 8107 was 8107, checked in by Henrik Bettermann, 13 years ago

Add viewlets module mainly for additional clearance scans.

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1## $Id: viewlets.py 8107 2012-04-11 11:11:19Z 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 waeup.uniben.interfaces import MessageFactory as _
25
26# LGA Identification
27
28class LGAIdentificationDisplay(FileDisplay):
29    """LGA Identification display viewlet.
30    """
31    grok.order(1)
32    label = _(u'LGA Identification')
33    title = _(u'LGA Identification Scan')
34    download_name = u'lga_identification'
35
36class LGAIdentificationSlip(LGAIdentificationDisplay):
37    grok.view(ExportPDFClearanceSlipPage)
38
39class LGAIdentificationUpload(FileUpload):
40    """LGA Identification upload viewlet.
41    """
42    grok.order(2)
43    label = _(u'LGA Identification')
44    title = _(u'LGA Identification Scan')
45    mus = 1024 * 150
46    download_name = u'lga_identification'
47    tab_redirect = '?tab2'
48
49class LGAIdentificationImage(Image):
50    """Renders LGA Identification scan.
51    """
52    grok.name('lga_identification')
53    download_name = u'lga_identification'
Note: See TracBrowser for help on using the repository browser.