mirror of
https://github.com/Kunsi/pretalx-plugin-broadcast-tools
synced 2024-11-21 20:11:01 +00:00
placeholders: what we actually want is schedule.event
here
This commit is contained in:
parent
dfa0945632
commit
ed960358a4
3 changed files with 6 additions and 6 deletions
|
@ -201,7 +201,7 @@ class PDFInfoPage(Flowable):
|
||||||
self._add(
|
self._add(
|
||||||
Paragraph(
|
Paragraph(
|
||||||
self.event.settings.broadcast_tools_pdf_additional_content.format(
|
self.event.settings.broadcast_tools_pdf_additional_content.format(
|
||||||
**placeholders(self.schedule, self.talk)
|
**placeholders(self.schedule.event, self.talk)
|
||||||
),
|
),
|
||||||
style=self.style["Meta"],
|
style=self.style["Meta"],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
def placeholders(schedule, talk, supports_html_colour=False):
|
def placeholders(event, talk, supports_html_colour=False):
|
||||||
track_name = str(talk.submission.track.name) if talk.submission.track else ""
|
track_name = str(talk.submission.track.name) if talk.submission.track else ""
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
"CODE": talk.submission.code,
|
"CODE": talk.submission.code,
|
||||||
"EVENT_SLUG": str(schedule.event.slug),
|
"EVENT_SLUG": str(event.slug),
|
||||||
"FEEDBACK_URL": "{}{}".format(
|
"FEEDBACK_URL": "{}{}".format(
|
||||||
schedule.event.custom_domain or settings.SITE_URL,
|
event.custom_domain or settings.SITE_URL,
|
||||||
talk.submission.urls.feedback,
|
talk.submission.urls.feedback,
|
||||||
),
|
),
|
||||||
"TALK_SLUG": talk.frab_slug,
|
"TALK_SLUG": talk.frab_slug,
|
||||||
"TALK_URL": "{}{}".format(
|
"TALK_URL": "{}{}".format(
|
||||||
schedule.event.custom_domain or settings.SITE_URL,
|
event.custom_domain or settings.SITE_URL,
|
||||||
talk.submission.urls.public,
|
talk.submission.urls.public,
|
||||||
),
|
),
|
||||||
"TRACK_NAME": track_name,
|
"TRACK_NAME": track_name,
|
||||||
|
|
|
@ -64,7 +64,7 @@ class BroadcastToolsScheduleView(EventPermissionRequired, ScheduleMixin, View):
|
||||||
"room": room["name"].localize(schedule.event.locale),
|
"room": room["name"].localize(schedule.event.locale),
|
||||||
"infoline": infoline.format(
|
"infoline": infoline.format(
|
||||||
**placeholders(
|
**placeholders(
|
||||||
schedule, talk, supports_html_colour=True
|
schedule.event, talk, supports_html_colour=True
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
"image_url": talk.submission.image_url,
|
"image_url": talk.submission.image_url,
|
||||||
|
|
Loading…
Reference in a new issue