mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2024-11-25 00:01:01 +00:00
add headings to questions and notes sections in pdf export
This commit is contained in:
parent
eb142b2483
commit
c90b7c4fdc
1 changed files with 23 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue