diff --git a/pretalx_broadcast_tools/exporter.py b/pretalx_broadcast_tools/exporter.py index 3eaa4c1..10f9a61 100644 --- a/pretalx_broadcast_tools/exporter.py +++ b/pretalx_broadcast_tools/exporter.py @@ -17,6 +17,8 @@ from reportlab.platypus import ( TableStyle, ) +from .utils.placeholders import placeholders + A4_WIDTH, A4_HEIGHT = A4 PAGE_PADDING = 10 * mm @@ -169,6 +171,17 @@ class PDFInfoPage(Flowable): ) ) + if self.event.settings.broadcast_tools_pdf_additional_content: + self._space() + self._add( + Paragraph( + self.event.settings.broadcast_tools_pdf_additional_content.format( + **placeholders(self.schedule, self.talk) + ), + style=self.style["Meta"], + ) + ) + if self.talk.submission.answers and self._questions: self._space() self._add( diff --git a/pretalx_broadcast_tools/forms.py b/pretalx_broadcast_tools/forms.py index e5cc8fa..aa5eb19 100644 --- a/pretalx_broadcast_tools/forms.py +++ b/pretalx_broadcast_tools/forms.py @@ -1,4 +1,4 @@ -from django.forms import BooleanField, CharField +from django.forms import BooleanField, CharField, Textarea from django.utils.translation import gettext_lazy as _ from hierarkey.forms import HierarkeyForm from i18nfield.forms import I18nFormField, I18nFormMixin, I18nTextInput @@ -14,7 +14,10 @@ class BroadcastToolsSettingsForm(I18nFormMixin, HierarkeyForm): required=True, ) broadcast_tools_lower_thirds_info_string = I18nFormField( - help_text=_("Will only be shown if there's a talk running."), + help_text=_( + "Will only be shown if there's a talk running. You may use " + "the place holders mentioned below." + ), label=_("info line"), required=False, widget=I18nTextInput, @@ -43,3 +46,13 @@ class BroadcastToolsSettingsForm(I18nFormMixin, HierarkeyForm): label=_("Questions to include"), required=False, ) + broadcast_tools_pdf_additional_content = CharField( + help_text=_( + "Additional content to print onto the PDF export. " + "Will get printed as-is. You may use the place holders " + "mentioned below." + ), + label=_("Additional Text"), + required=False, + widget=Textarea, + ) diff --git a/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html b/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html index 55d87f0..06d0066 100644 --- a/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html +++ b/pretalx_broadcast_tools/templates/pretalx_broadcast_tools/orga.html @@ -17,15 +17,6 @@ lower third. If you set it to an empty string, it will automatically hide itself.
-
- pretalx will automatically replace some placeholders in your info
- string.
- Use {CODE}
to embed the talk code (MUX9U3
- for example). You could use this to directly link to the talk
- feedback page.
- Use {EVENT_SLUG}
to get the event slug.
- Use {TALK_SLUG}
to get the talk slug.
-