Ignore:
Timestamp:
14 Feb 2013, 07:55:54 (12 years ago)
Author:
Henrik Bettermann
Message:

In Okene the pdf logo depends on the context. Therefore we have to pass the student and applicant object to create_pdf.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py

    r9452 r9946  
    133133        # append comments
    134134        data = self._addComments(data)
    135 
    136         return creator.create_pdf(data, None, doc_title, note=self.note)
     135        return creator.create_pdf(
     136            data, None, doc_title, note=self.note, context=self.context)
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/interfaces.py

    r9555 r9946  
    180180        """
    181181    def create_pdf(data, headerline=None, title=None, author=None,
    182                    footer='', note=None, sigs_in_footer=[]):
     182                   footer='', note=None, sigs_in_footer=[], context=None):
    183183        """Create a PDF.
    184184
     
    203203
    204204        If no `title` is given, nothing will be rendered.
     205
     206        `context` could be the student or the applicant object. In customized
     207        packages this parameter can be used to create context-dependent
     208        pdf slips.
    205209        """
    206210
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py

    r9913 r9946  
    397397
    398398    def create_pdf(self, data, headerline=None, title=None, author=None,
    399                    footer='', note=None, sigs_in_footer=[], topMargin=1.5):
     399                   footer='', note=None, sigs_in_footer=[], topMargin=1.5,
     400                   context=None):
    400401        """Returns a binary data stream which is a PDF document.
    401402        """
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r9944 r9946  
    582582        pdf_stream = creator.create_pdf(
    583583            data, None, doc_title, author=author, footer=footer_text,
    584             note=None)
     584            note=None, context=student)
    585585        return pdf_stream
    586586
     
    666666            pdf_stream = creator.create_pdf(
    667667                data, None, doc_title, author=author, footer=footer_text,
    668                 note=note, sigs_in_footer=sigs_in_footer, topMargin=topMargin)
     668                note=note, sigs_in_footer=sigs_in_footer, topMargin=topMargin,
     669                context=student)
    669670        except IOError:
    670671            view.flash('Error in image file.')
Note: See TracChangeset for help on using the changeset viewer.