Short message on PDF if there are no applications (#249)

This commit is contained in:
Norman Jäckel 2012-06-29 11:42:28 +02:00
parent cb2a4b9897
commit aa30a1900b

View File

@ -700,6 +700,9 @@ class ApplicationPDF(PDFView):
if preamble:
story.append(Paragraph("%s" % preamble.replace('\r\n','<br/>'), stylesheet['Paragraph']))
story.append(Spacer(0,0.75*cm))
if not Application.objects.exists(): # No applications existing
story.append(Paragraph(_("No applications existing."), stylesheet['Heading3']))
else: # Print all Applications
# List of applications
for application in Application.objects.order_by('number'):
if application.number: