Ignore:
Timestamp:
13 Feb 2013, 10:19:05 (12 years ago)
Author:
Henrik Bettermann
Message:

Also admission slip labels can be multiline.

File:
1 edited

Legend:

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

    r9922 r9944  
    542542        author = '%s (%s)' % (view.request.principal.title,
    543543                              view.request.principal.id)
    544         footer_text = view.label
     544        footer_text = view.label.split('\n')
     545        if len(footer_text) > 1:
     546            # We can add a department in first line
     547            footer_text = footer_text[1]
     548        else:
     549            # Only the first line is used for the footer
     550            footer_text = footer_text[0]
    545551        if getattr(student, 'student_id', None) is not None:
    546552            footer_text = "%s - %s - " % (student.student_id, footer_text)
Note: See TracChangeset for help on using the changeset viewer.