Ignore:
Timestamp:
10 Aug 2024, 07:01:52 (5 months ago)
Author:
Henrik Bettermann
Message:

Add an id to download filenames if necessary. Enable this feature for Final Year Clearance Routing Slip.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

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

    r17867 r17877  
    164164    grok.require('waeup.viewStudent')
    165165    label = _(u'Scanned Final Clearance Routing Slip ')
    166     download_name = u'routingslip'
    167 
     166    download_name = u'routingslip.pdf'
    168167
    169168class FinalClearanceUploadManage(StudentFileUpload):
     
    174173    grok.view(StudentBaseManageFormPage)
    175174    grok.require('waeup.manageStudent')
    176     label = _(u'Scanned Final Clearance Routing Slip (pdf preferred)')
    177     download_name = u'routingslip'
     175    label = _(u'Scanned Final Clearance Routing Slip (pdf only)')
     176    download_name = u'routingslip.pdf'
    178177
    179178class FinalClearanceUploadEdit(FinalClearanceUploadManage):
     
    223222    """Renders pdf slip.
    224223    """
    225     grok.name('routingslip')
     224    grok.name('routingslip.pdf')
    226225    download_name = u'routingslip'
     226
     227    @property
     228    def add_id(self):
     229        return self.context.student_id
    227230
    228231class ApplicationSlipImage(StudentImage):
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r17867 r17877  
    719719        self.browser.getControl(
    720720            name='upload_finalclearanceuploadmanage').click()
    721         self.assertTrue(
    722             'href="http://localhost/app/students/K1000000/routingslip"'
     721        print self.browser.contents
     722        self.assertTrue(
     723            'href="http://localhost/app/students/K1000000/routingslip.pdf"'
    723724            in self.browser.contents)
    724725        return
Note: See TracChangeset for help on using the changeset viewer.