Changeset 9657


Ignore:
Timestamp:
17 Nov 2012, 08:24:15 (12 years ago)
Author:
Henrik Bettermann
Message:

Display report creation date.

Adjust margin between headline and body.

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

Legend:

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

    r9555 r9657  
    393393            pdf_stream,
    394394            bottomMargin=bottomMargin,
    395             topMargin=1.3*inch,
     395            topMargin=1.5*inch,
    396396            title=title,
    397397            pagesize=portrait(A4),
  • main/waeup.kofa/trunk/src/waeup/kofa/students/reports.py

    r9654 r9657  
    137137        table_data = tbl_data_to_table(*self.data)
    138138        col_widths = [None,] + [1.6*cm] * len(self.data[1]) + [None,]
    139         #pdf_data = [Paragraph('<b>Study mode:</b> %s' % self.mode,
    140         #                      STYLE["Normal"]),
    141         #            Spacer(1, 12),]
    142         pdf_data = [
     139        creation_dt = self.creation_dt.astimezone(getUtility(IKofaUtils).tzinfo)
     140        creation_dt = creation_dt.strftime("%Y-%m-%d %H:%M:%S %Z")
     141        pdf_data = [Paragraph('<b>%s</b>' % creation_dt,
     142                              STYLE["Normal"]),
     143                    Spacer(1, 12),]
     144        pdf_data += [
    143145            Table(table_data, style=TABLE_STYLE, colWidths=col_widths)]
    144         doc_title = '%s Students in Session %s' % (
    145             self.mode,
    146             self.session,)
     146        doc_title = '%s Students in Session %s' % (self.mode, self.session)
    147147        pdf = creator.create_pdf(
    148148            pdf_data, None, doc_title, self.author,
    149             'Students in Session %s,' % self.session)
     149            'Students in Session %s' % self.session)
    150150        open('/tmp/result.pdf', 'wb').write(pdf)
    151151        return pdf
Note: See TracChangeset for help on using the changeset viewer.