Ignore:
Timestamp:
6 Nov 2012, 05:23:28 (12 years ago)
Author:
Henrik Bettermann
Message:

Show signature in footer on clearance slip.

File:
1 edited

Legend:

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

    r9543 r9548  
    633633
    634634    def _signatures(self):
    635         if self.context.state in (CLEARED, ):
     635        isStudent = getattr(
     636            self.request.principal, 'user_type', None) == 'student'
     637        if not isStudent and self.context.state in (CLEARED, ):
    636638            return (_('Student Signature'), _('Clearance Officer Signature'))
    637639        return
     640
     641    def _sigInFooter(self):
     642        isStudent = getattr(
     643            self.request.principal, 'user_type', None) == 'student'
     644        if not isStudent and self.context.state in (CLEARED, ):
     645            return True
     646        return False
    638647
    639648    def render(self):
     
    643652        return students_utils.renderPDF(
    644653            self, 'clearance_slip.pdf',
    645             self.context.student, studentview, signatures=self._signatures())
     654            self.context.student, studentview, signatures=self._signatures(),
     655            sig_in_footer=self._sigInFooter())
    646656
    647657class StudentClearanceManageFormPage(KofaEditFormPage):
Note: See TracChangeset for help on using the changeset viewer.