[10765] | 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 | |
---|
| 19 | import grok |
---|
| 20 | from waeup.kofa.interfaces import REQUESTED |
---|
| 21 | from waeup.kofa.browser.viewlets import ManageActionButton |
---|
[15563] | 22 | from kofacustom.iuokada.students.interfaces import ( |
---|
[10765] | 23 | ICustomStudentStudyCourse, ICustomStudentStudyLevel) |
---|
[12430] | 24 | from waeup.kofa.students.fileviewlets import ( |
---|
[12450] | 25 | StudentFileDisplay, StudentFileUpload, StudentImage) |
---|
[10765] | 26 | from waeup.kofa.students.browser import ( |
---|
[13062] | 27 | ExportPDFClearanceSlip, StudyCourseDisplayFormPage, |
---|
[10765] | 28 | StudyLevelDisplayFormPage) |
---|
| 29 | |
---|
| 30 | from kofacustom.nigeria.interfaces import MessageFactory as _ |
---|
[15650] | 31 | |
---|
| 32 | # Signature |
---|
| 33 | |
---|
| 34 | class 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 | |
---|
| 42 | class SignatureSlip(SignatureDisplay): |
---|
| 43 | grok.view(ExportPDFClearanceSlip) |
---|
| 44 | |
---|
| 45 | class 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 | |
---|
| 54 | class SignatureImage(StudentImage): |
---|
| 55 | """Renders acceptance letter scan. |
---|
| 56 | """ |
---|
| 57 | grok.name('signature') |
---|
| 58 | download_name = u'signature' |
---|
| 59 | |
---|
[15654] | 60 | # JAMB Result |
---|
| 61 | |
---|
| 62 | class 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 | |
---|
| 70 | class JAMBResultSlip(JAMBResultDisplay): |
---|
| 71 | grok.view(ExportPDFClearanceSlip) |
---|
| 72 | |
---|
| 73 | class 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 | |
---|
| 81 | class JAMBResultImage(StudentImage): |
---|
| 82 | """Renders JAMB Result scan. |
---|
| 83 | """ |
---|
| 84 | grok.name('jamb') |
---|
| 85 | download_name = u'jamb' |
---|
| 86 | |
---|