forked from CGM_Public/pretix_original
Add signal global_footer_link
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user