Ignore:
Timestamp:
2 Aug 2024, 19:10:34 (3 months ago)
Author:
Henrik Bettermann
Message:

Implement Final Year Clearance Routing Slip upload (not active in base package).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/fileviewlets.py

    r16609 r17867  
    3737    StudentBaseDisplayFormPage, StudentBaseManageFormPage,
    3838    StudentClearanceDisplayFormPage, StudentClearanceManageFormPage,
    39     ExportPDFClearanceSlip, StudentFilesUploadPage, StudentSignatureUploadPage)
     39    ExportPDFClearanceSlip, StudentFilesUploadPage, StudentSignatureUploadPage,
     40    StudentFinalClearanceUploadPage)
    4041
    4142grok.context(IKofaObject) # Make IKofaObject the default context
     
    114115        return kofa_utils.MAX_PASSPORT_SIZE
    115116
     117class PassportUploadEdit(PassportUploadManage):
     118    """Passport upload viewlet for students.
     119    """
     120    grok.view(StudentFilesUploadPage)
     121    grok.require('waeup.uploadStudentFile')
    116122
    117123class SignatureDisplay(StudentFileDisplay):
     
    125131    label = _(u'Scanned Signature')
    126132    download_name = u'signature.jpg'
    127 
    128133
    129134class SignatureUploadManage(StudentFileUpload):
     
    137142    label = _(u'Scanned Signature (jpg only)')
    138143    download_name = u'signature.jpg'
    139     tab_redirect = '#tab2'
    140144
    141145    @property
     
    145149
    146150
    147 class PassportUploadEdit(PassportUploadManage):
    148     """Passport upload viewlet for students.
    149     """
    150     grok.view(StudentFilesUploadPage)
    151     grok.require('waeup.uploadStudentFile')
    152 
    153 
    154151class SignatureUploadEdit(SignatureUploadManage):
    155152    """Signature upload viewlet for students.
     
    158155    grok.require('waeup.uploadStudentFile')
    159156
     157
     158class FinalClearanceDisplay(StudentFileDisplay):
     159    """Final Clearance Routing Slip display viewlet.
     160    """
     161    grok.order(4)
     162    grok.context(IStudent)
     163    grok.view(StudentBaseDisplayFormPage)
     164    grok.require('waeup.viewStudent')
     165    label = _(u'Scanned Final Clearance Routing Slip ')
     166    download_name = u'routingslip'
     167
     168
     169class FinalClearanceUploadManage(StudentFileUpload):
     170    """Final Clearance Routing Slip upload viewlet for officers.
     171    """
     172    grok.order(4)
     173    grok.context(IStudent)
     174    grok.view(StudentBaseManageFormPage)
     175    grok.require('waeup.manageStudent')
     176    label = _(u'Scanned Final Clearance Routing Slip (pdf preferred)')
     177    download_name = u'routingslip'
     178
     179class FinalClearanceUploadEdit(FinalClearanceUploadManage):
     180    """Final Clearance Form upload viewlet for students.
     181    """
     182    grok.view(StudentFinalClearanceUploadPage)
     183    grok.require('waeup.uploadStudentFile')
    160184
    161185class BirthCertificateDisplay(StudentFileDisplay):
     
    196220    grok.context(IStudent)
    197221
     222class FinalClearance(StudentImage):
     223    """Renders pdf slip.
     224    """
     225    grok.name('routingslip')
     226    download_name = u'routingslip'
     227
    198228class ApplicationSlipImage(StudentImage):
    199229    """Renders application slip scan.
Note: See TracChangeset for help on using the changeset viewer.