source: main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/viewlets.py @ 17567

Last change on this file since 17567 was 17561, checked in by Henrik Bettermann, 15 months ago

See ticket #42 comment 12

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1## $Id: viewlets.py 17561 2023-08-27 13:01:06Z 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.unidel.students.interfaces import (ICustomStudent,
23    ICustomStudentStudyCourse, ICustomStudentStudyLevel)
24from waeup.kofa.students.fileviewlets import (
25    StudentFileDisplay, StudentFileUpload, StudentImage)
26from waeup.kofa.students.browser import (StudentBaseDisplayFormPage,
27    ExportPDFClearanceSlip, StudyCourseDisplayFormPage,
28    StudyLevelDisplayFormPage)
29
30from kofacustom.nigeria.interfaces import MessageFactory as _
31
32class ExamClearanceSlipActionButton(ManageActionButton):
33    grok.order(10)
34    grok.context(ICustomStudent)
35    grok.view(StudentBaseDisplayFormPage)
36    grok.require('waeup.manageStudent')
37    text = _('Download examination clearance slip')
38    target = 'examclearance_slip.pdf'
39    icon = 'actionicon_pdf.png'
40
41    @property
42    def target_url(self):
43        #if not self.context.state in :
44        #    return ''
45        return self.view.url(self.view.context, self.target)
Note: See TracBrowser for help on using the repository browser.