Ignore:
Timestamp:
7 Sep 2024, 15:38:05 (12 days ago)
Author:
Henrik Bettermann
Message:

Implement ExportPDFFinalClearanceSlip.

File:
1 edited

Legend:

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

    r17867 r17917  
    3232    OnlinePaymentDisplayFormPage, BedTicketDisplayFormPage,
    3333    StudentClearanceEditFormPage, StudentPersonalEditFormPage,
    34     PaymentsManageFormPage, StudyCourseTranscriptPage)
     34    PaymentsManageFormPage, StudyCourseTranscriptPage,
     35    StudentFinalClearanceUploadPage)
    3536from waeup.kofa.students.interfaces import (
    3637    IStudentsContainer, IStudent, IStudentStudyCourse, IStudentStudyLevel,
     
    897898            "The electronic signature replaces your handwritten signature.\\n\\n"
    898899            "You really want to sign the transcript?'")
     900
     901class FinalClearanceSlipActionButton(ManageActionButton):
     902    grok.order(1)
     903    grok.context(IStudent)
     904    grok.view(StudentFinalClearanceUploadPage)
     905    grok.require('waeup.viewStudent')
     906    icon = 'actionicon_pdf.png'
     907    text = _('Download Final Clearance Document')
     908    target = 'final_clearance_slip.pdf'
     909
     910    @property
     911    def target_url(self):
     912        final_slip = getUtility(IExtFileStore).getFileByContext(
     913            self.context.student, attr='routingslip.pdf')
     914        if final_slip:
     915            return self.view.url(self.view.context, self.target)
     916        return False
    899917
    900918
Note: See TracChangeset for help on using the changeset viewer.