#249 improve application pdf
This commit is contained in:
parent
1b108603ea
commit
a48c63c132
@ -712,17 +712,18 @@ class ApplicationPDF(PDFView):
|
|||||||
if preamble:
|
if preamble:
|
||||||
story.append(Paragraph("%s" % preamble.replace('\r\n','<br/>'), stylesheet['Paragraph']))
|
story.append(Paragraph("%s" % preamble.replace('\r\n','<br/>'), stylesheet['Paragraph']))
|
||||||
story.append(Spacer(0,0.75*cm))
|
story.append(Spacer(0,0.75*cm))
|
||||||
if not Application.objects.exists(): # No applications existing
|
applications = Application.objects.order_by('number')
|
||||||
story.append(Paragraph(_("No applications existing."), stylesheet['Heading3']))
|
if not applications: # No applications existing
|
||||||
|
story.append(Paragraph(_("No applications available."), stylesheet['Heading3']))
|
||||||
else: # Print all Applications
|
else: # Print all Applications
|
||||||
# List of applications
|
# List of applications
|
||||||
for application in Application.objects.order_by('number'):
|
for application in applications:
|
||||||
if application.number:
|
if application.number:
|
||||||
story.append(Paragraph(_("Application No.")+" %s: %s" % (application.number, application.title), stylesheet['Heading3']))
|
story.append(Paragraph(_("Application No.")+" %s: %s" % (application.number, application.title), stylesheet['Heading3']))
|
||||||
else:
|
else:
|
||||||
story.append(Paragraph(_("Application No.")+" : %s" % (application.title), stylesheet['Heading3']))
|
story.append(Paragraph(_("Application No.")+" : %s" % (application.title), stylesheet['Heading3']))
|
||||||
# Applications details (each application on single page)
|
# Applications details (each application on single page)
|
||||||
for application in Application.objects.order_by('number'):
|
for application in applications:
|
||||||
story.append(PageBreak())
|
story.append(PageBreak())
|
||||||
story = self.get_application(application, story)
|
story = self.get_application(application, story)
|
||||||
else: # print selected application
|
else: # print selected application
|
||||||
|
Loading…
Reference in New Issue
Block a user