Changeset 14610


Ignore:
Timestamp:
8 Mar 2017, 11:58:40 (8 years ago)
Author:
Henrik Bettermann
Message:

Enable customization of footer.

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

Legend:

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

    r14609 r14610  
    132132    def title(self):
    133133        return translate(_('Level Report'))
     134
     135    @property
     136    def right_footer(self):
     137        return self.title + ' - %s -' % self.session
    134138
    135139    def _excluded(self, level_obj):
     
    269273        pdf_data += [
    270274            Table(table_data, style=TABLE_STYLE, colWidths=col_widths)]
    271         doc_title = self.title
    272275
    273276        pdf_data.append(Spacer(1, 40))
     
    278281
    279282        pdf = creator.create_pdf(
    280             pdf_data, None, doc_title, self.author,
    281             doc_title + ' - %s -' % self.session,
    282             note = self.note
     283            pdf_data, None, self.title, self.author,
     284            self.right_footer, note = self.note
    283285            )
    284286        return pdf
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/raw_score_report.py

    r14607 r14610  
    113113    depcode = None
    114114    certcode = None
    115     title = translate(_('Raw Score Report'))
    116 
    117115    note = ""
    118116    signatures = None
     117
     118    @property
     119    def title(self):
     120        return translate(_('Raw Score Report'))
     121
     122    @property
     123    def right_footer(self):
     124        return self.title + ' - %s -' % self.session
    119125
    120126    def _excluded(self, level_obj):
     
    260266                      style=TABLE_STYLE,
    261267                      colWidths=col_widths)]
    262         doc_title = self.title
    263268        pdf_data.append(Spacer(1, 20))
    264269        if self.signatures:
     
    268273
    269274        pdf = creator.create_pdf(
    270             pdf_data, None, doc_title, self.author,
    271             doc_title + ' - %s -' % self.session,
    272             note=self.note
     275            pdf_data, None, self.title, self.author,
     276            self.right_footer, note=self.note
    273277            )
    274278        return pdf
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/session_results_presentation.py

    r14607 r14610  
    7373    signatures = None
    7474    introduction = ''
    75     title = translate(_('Presentation of Session Results'))
     75
     76    @property
     77    def title(self):
     78        return translate(_('Presentation of Session Results'))
     79
     80    @property
     81    def right_footer(self):
     82        return self.title + ' - %s -' % self.session
    7683
    7784    note = None
     
    243250        pdf_data += [Table(table_data, style=SUMMARY_STYLE, hAlign='LEFT')]
    244251
    245         doc_title = self.title
    246252        pdf_data.append(Spacer(1, 40))
    247253        if self.signatures:
     
    250256
    251257        pdf = creator.create_pdf(
    252             pdf_data, None, doc_title, self.author,
    253             doc_title + ' - %s -' % self.session,
    254             note = self.note
     258            pdf_data, None, self.title, self.author,
     259            self.right_footer, note = self.note
    255260            )
    256261        return pdf
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_payment_statistics.py

    r14607 r14610  
    196196    title = translate(_('Student Payment Statistics'))
    197197
     198    @property
     199    def title(self):
     200        return translate(_('Student Payment Statistics'))
     201
    198202    def __init__(self, session, mode, level, entry_session, p_session,
    199203                 breakdown, author='System'):
     
    261265        pdf_data += [
    262266            Table(table_data, style=TABLE_STYLE, colWidths=col_widths)]
    263         doc_title = self.title
    264267        right_footer = translate(
    265268            _('${a} Student Payments - ${b} -',
    266269            mapping = {'a':self.mode, 'b':self.session}))
    267270        pdf = creator.create_pdf(
    268             pdf_data, None, doc_title, self.author, right_footer
     271            pdf_data, None, self.title, self.author, right_footer
    269272            )
    270273        return pdf
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports/student_statistics.py

    r14607 r14610  
    146146    title = translate(_('Student Statistics'))
    147147
     148    @property
     149    def title(self):
     150        return translate(_('Student Statistics'))
     151
    148152    def __init__(self, session, mode, level, breakdown, author='System'):
    149153        super(StudentStatisticsReport, self).__init__(
     
    187191        pdf_data += [
    188192            Table(table_data, style=TABLE_STYLE, colWidths=col_widths)]
    189         doc_title = self.title
    190193        right_footer = translate(
    191194            _('${a} Students - ${b} -',
    192195            mapping = {'a':self.mode, 'b':self.session}))
    193196        pdf = creator.create_pdf(
    194             pdf_data, None, doc_title, self.author, right_footer
     197            pdf_data, None, self.title, self.author, right_footer
    195198            )
    196199        return pdf
Note: See TracChangeset for help on using the changeset viewer.