Changeset 15200


Ignore:
Timestamp:
25 Oct 2018, 10:15:03 (6 years ago)
Author:
Henrik Bettermann
Message:

Increase Margin if title contains linebreaks.

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

Legend:

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

    r14495 r15200  
    825825        pdf_stream = StringIO()
    826826        bottomMargin = len(sigs_in_footer) and 1.9*inch or 1.2*inch
     827        topMargin += title.count('\n') * 0.2
    827828        doc = SimpleDocTemplate(
    828829            pdf_stream,
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r15197 r15200  
    43944394    def test_lecturers_can_download_course_tickets(self):
    43954395        # A course ticket slip can be downloaded
    4396         self.course.title = (u'Lorem ipsum dolor sit amet, consectetur '
    4397                             u'adipisici elit, sed eiusmod tempor incidunt')
     4396        self.course.title = (u'Lorem ipsum dolor sit amet, consectetur adipisici, '
     4397                             u'sed eiusmod tempor incidunt ut labore et dolore ')
    43984398        self.login_as_lecturer()
    43994399        pdf_url = '%s/coursetickets.pdf' % self.course_url
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r15197 r15200  
    10121012            ft = view.context.title[
    10131013                :(title_length-len(view.context.code))] + u' ...'
    1014             pdf_data.append(Spacer(1, 20))
    10151014        pdf_data += [Paragraph(
    10161015            translate(_('<b>Lecturer(s): ${a}</b>',
Note: See TracChangeset for help on using the changeset viewer.