1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-11-22 01:31:02 +00:00

add headings to questions and notes sections in pdf export

This commit is contained in:
Franzi 2022-11-07 04:10:17 +01:00
parent eb142b2483
commit c90b7c4fdc
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -158,7 +158,6 @@ class PDFInfoPage(Flowable):
) )
if self.talk.submission.abstract: if self.talk.submission.abstract:
self._space()
self._add( self._add(
Paragraph( Paragraph(
self.talk.submission.abstract, self.talk.submission.abstract,
@ -168,6 +167,12 @@ class PDFInfoPage(Flowable):
if self.talk.submission.answers and self._questions: if self.talk.submission.answers and self._questions:
self._space() self._space()
self._add(
Paragraph(
"Questions",
style=self.style["Heading"],
)
)
for answer in sorted(self.talk.submission.answers.all()): for answer in sorted(self.talk.submission.answers.all()):
if answer.question.id not in self._questions: if answer.question.id not in self._questions:
continue continue
@ -179,6 +184,12 @@ class PDFInfoPage(Flowable):
if self.talk.submission.notes: if self.talk.submission.notes:
self._space() self._space()
self._add(
Paragraph(
"Notes",
style=self.style["Heading"],
)
)
for line in self.talk.submission.notes.splitlines(): for line in self.talk.submission.notes.splitlines():
line = line.strip() line = line.strip()
if not line: if not line:
@ -195,6 +206,12 @@ class PDFInfoPage(Flowable):
and self.event.settings.broadcast_tools_pdf_show_internal_notes and self.event.settings.broadcast_tools_pdf_show_internal_notes
): ):
self._space() self._space()
self._add(
Paragraph(
"Internal Notes",
style=self.style["Heading"],
)
)
for line in self.talk.submission.internal_notes.splitlines(): for line in self.talk.submission.internal_notes.splitlines():
line = line.strip() line = line.strip()
if not line: if not line:
@ -256,6 +273,11 @@ class PDFExporter(ScheduleData):
stylesheet.add( stylesheet.add(
ParagraphStyle(name="Meta", fontName="Helvetica", fontSize=14, leading=16) ParagraphStyle(name="Meta", fontName="Helvetica", fontSize=14, leading=16)
) )
stylesheet.add(
ParagraphStyle(
name="Heading", fontName="Helvetica-Bold", fontSize=14, leading=16
)
)
stylesheet.add( stylesheet.add(
ParagraphStyle( ParagraphStyle(
name="Question", fontName="Helvetica", fontSize=12, leading=14 name="Question", fontName="Helvetica", fontSize=12, leading=14