Add signal pretix.control.signals.event_dashboard_top

This commit is contained in:
Raphael Michel
2020-09-06 16:48:15 +02:00
parent d999971249
commit e8f3a66a8e
3 changed files with 14 additions and 1 deletions

View File

@@ -92,6 +92,17 @@ This is no ``EventPluginSignal``, so you do not get the event in the ``sender``
and you may get the signal regardless of whether your plugin is active.
"""
event_dashboard_top = EventPluginSignal(
providing_args=['request']
)
"""
This signal is sent out to include custom HTML in the top part of the the event dashboard.
Receivers should return HTML.
As with all plugin signals, the ``sender`` keyword argument will contain the event.
An additional keyword argument ``subevent`` *can* contain a sub-event.
"""
event_dashboard_widgets = EventPluginSignal(
providing_args=[]
)

View File

@@ -3,6 +3,7 @@
{% load eventurl %}
{% load bootstrap3 %}
{% load static %}
{% load eventsignal %}
{% block title %}{{ request.event.name }}{% endblock %}
{% block content %}
<h1>
@@ -63,6 +64,7 @@
class="btn btn-primary">{% trans "Show affected orders" %}</a>
</div>
{% endif %}
{% eventsignal request.event "pretix.control.signals.event_dashboard_top" request=request %}
{% if actions|length > 0 %}
<div class="panel panel-danger">
<div class="panel-heading">