Add signal global_footer_link

This commit is contained in:
Raphael Michel
2021-02-04 17:32:10 +01:00
parent af7d9942f6
commit 5ae7a350b0
3 changed files with 16 additions and 3 deletions

View File

@@ -14,8 +14,8 @@ from pretix.helpers.i18n import (
from ..base.i18n import get_language_without_region
from .signals import (
footer_link, global_html_footer, global_html_head, global_html_page_header,
html_footer, html_head, html_page_header,
footer_link, global_footer_link, global_html_footer, global_html_head,
global_html_page_header, html_footer, html_head, html_page_header,
)
logger = logging.getLogger(__name__)
@@ -65,6 +65,11 @@ def _default_context(request):
_html_head.append(response)
for receiver, response in global_html_footer.send(None, request=request):
_html_foot.append(response)
for receiver, response in global_footer_link.send(None, request=request):
if isinstance(response, list):
_footer += response
else:
_footer.append(response)
if hasattr(request, 'event') and get_scope():
for receiver, response in html_head.send(request.event, request=request):

View File

@@ -105,6 +105,14 @@ are expected to return a dictionary containing the keys ``label`` and ``url``.
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
global_footer_link = Signal(
providing_args=["request"]
)
"""
The signal ``pretix.presale.signals.global_footer_link`` allows you to add links to the footer of any page. You
are expected to return a dictionary containing the keys ``label`` and ``url``.
"""
checkout_confirm_messages = EventPluginSignal()
"""
This signal is sent out to retrieve short messages that need to be acknowledged by the user before the