Fixed agenda pdf layout of subitems.

This commit is contained in:
Emanuel Schuetze 2011-09-11 17:06:32 +02:00
parent f673233a18
commit 7ef4013b4b

View File

@ -104,14 +104,14 @@ stylesheet.add(ParagraphStyle(name = 'Heading4',
stylesheet.add(ParagraphStyle(name = 'Item', stylesheet.add(ParagraphStyle(name = 'Item',
parent = stylesheet['Normal'], parent = stylesheet['Normal'],
fontSize = 14, fontSize = 14,
leading = 12, leading = 14,
leftIndent = 0, leftIndent = 0,
spaceAfter = 15) spaceAfter = 15)
) )
stylesheet.add(ParagraphStyle(name = 'Subitem', stylesheet.add(ParagraphStyle(name = 'Subitem',
parent = stylesheet['Normal'], parent = stylesheet['Normal'],
fontSize = 10, fontSize = 10,
leading = 4, leading = 10,
leftIndent = 20, leftIndent = 20,
spaceAfter = 15) spaceAfter = 15)
) )
@ -237,8 +237,11 @@ def print_agenda(request):
# print all items" # print all items"
if item.parents: if item.parents:
space = "" space = ""
counter = 0
for p in item.parents: for p in item.parents:
space += "   " if counter != 0:
space += "      "
counter += 1
story.append(Paragraph(space+item.title, stylesheet['Subitem'])) story.append(Paragraph(space+item.title, stylesheet['Subitem']))
else: else:
story.append(Paragraph(item.title, stylesheet['Item'])) story.append(Paragraph(item.title, stylesheet['Item']))