diff --git a/doc/development/api/general.rst b/doc/development/api/general.rst index 193421d648..2a325115fd 100644 --- a/doc/development/api/general.rst +++ b/doc/development/api/general.rst @@ -47,7 +47,7 @@ Backend ------- .. automodule:: pretix.control.signals - :members: nav_event, html_head + :members: nav_event, html_head, quota_detail_html .. automodule:: pretix.base.signals diff --git a/src/pretix/control/signals.py b/src/pretix/control/signals.py index 650a488cdd..e9186e776e 100644 --- a/src/pretix/control/signals.py +++ b/src/pretix/control/signals.py @@ -94,3 +94,13 @@ You will receive the default form class (or the class set by a previous plugin) As with all plugin signals, the ``sender`` keyword argument will contain the event. """ + +quota_detail_html = EventPluginSignal( + providing_args=['quota'] +) +""" +This signal allows you to append HTML to a Quota's detail view. You receive the +quota as argument in the ``quota`` keyword argument. + +As with all plugin signals, the ``sender`` keyword argument will contain the event. +""" diff --git a/src/pretix/control/templates/pretixcontrol/items/quota.html b/src/pretix/control/templates/pretixcontrol/items/quota.html index a08b0cfa20..1a1a9dba41 100644 --- a/src/pretix/control/templates/pretixcontrol/items/quota.html +++ b/src/pretix/control/templates/pretixcontrol/items/quota.html @@ -1,6 +1,7 @@ {% extends "pretixcontrol/items/base.html" %} {% load i18n %} {% load bootstrap3 %} +{% load eventsignal %} {% block title %}{% blocktrans with name=quota.name %}Quota: {{ name }}{% endblocktrans %}{% endblock %} {% block inside %}