Updated application pdf.

This commit is contained in:
Emanuel Schuetze 2011-09-07 18:43:25 +02:00
parent f185b2e63c
commit 57e966a97b

View File

@ -336,11 +336,9 @@ def print_passwords(request):
def get_application(application, story): def get_application(application, story):
# application number # application number
if application.number is None: if application.number is None:
story.append(Paragraph(_("Application No.")+" [-]", stylesheet['Heading1'])) story.append(Paragraph(_("Application No."), stylesheet['Heading1']))
else: else:
story.append(Paragraph(_("Application No.")+" %s" % application.number, stylesheet['Heading1'])) story.append(Paragraph(_("Application No.")+" %s" % application.number, stylesheet['Heading1']))
# title
story.append(Paragraph(_("Subject")+": "+application.title, stylesheet['Heading3']))
# submitter # submitter
cell1a = [] cell1a = []
@ -350,7 +348,9 @@ def get_application(application, story):
cell1b.append(Spacer(0,0.2*cm)) cell1b.append(Spacer(0,0.2*cm))
if application.status == "pub": if application.status == "pub":
cell1b.append(Paragraph("__________________________________________",stylesheet['Signaturefield'])) cell1b.append(Paragraph("__________________________________________",stylesheet['Signaturefield']))
cell1b.append(Spacer(0,0.1*cm))
cell1b.append(Paragraph("       "+unicode(application.submitter.profile), stylesheet['Small'])) cell1b.append(Paragraph("       "+unicode(application.submitter.profile), stylesheet['Small']))
cell1b.append(Spacer(0,0.2*cm))
else: else:
cell1b.append(Paragraph(unicode(application.submitter.profile), stylesheet['Normal'])) cell1b.append(Paragraph(unicode(application.submitter.profile), stylesheet['Normal']))
@ -373,6 +373,9 @@ def get_application(application, story):
cell3a.append(Paragraph("<font name='Ubuntu-Bold'>%s:</font>" % _("Status"), stylesheet['Heading4'])) cell3a.append(Paragraph("<font name='Ubuntu-Bold'>%s:</font>" % _("Status"), stylesheet['Heading4']))
cell3b = [] cell3b = []
if note != "": if note != "":
if application.status == "pub":
cell3b.append(Paragraph(note, stylesheet['Normal']))
else:
cell3b.append(Paragraph("%s | %s" % (application.get_status_display(), note), stylesheet['Normal'])) cell3b.append(Paragraph("%s | %s" % (application.get_status_display(), note), stylesheet['Normal']))
else: else:
cell3b.append(Paragraph("%s" % application.get_status_display(), stylesheet['Normal'])) cell3b.append(Paragraph("%s" % application.get_status_display(), stylesheet['Normal']))
@ -402,6 +405,9 @@ def get_application(application, story):
])) ]))
story.append(t) story.append(t)
story.append(Spacer(0,1*cm)) story.append(Spacer(0,1*cm))
# title
story.append(Paragraph(application.title, stylesheet['Heading3']))
# text # text
story.append(Paragraph("%s" % application.text.replace('\r\n','<br/>'), stylesheet['Paragraph'])) story.append(Paragraph("%s" % application.text.replace('\r\n','<br/>'), stylesheet['Paragraph']))
# reason # reason