mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Add signal pretix.control.signals.event_dashboard_top
This commit is contained in:
@@ -72,7 +72,7 @@ Dashboards
|
|||||||
""""""""""
|
""""""""""
|
||||||
|
|
||||||
.. automodule:: pretix.control.signals
|
.. automodule:: pretix.control.signals
|
||||||
:members: event_dashboard_widgets, user_dashboard_widgets
|
:members: event_dashboard_widgets, user_dashboard_widgets, event_dashboard_top
|
||||||
|
|
||||||
Ticket designs
|
Ticket designs
|
||||||
""""""""""""""
|
""""""""""""""
|
||||||
|
|||||||
@@ -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.
|
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(
|
event_dashboard_widgets = EventPluginSignal(
|
||||||
providing_args=[]
|
providing_args=[]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
{% load eventurl %}
|
{% load eventurl %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
{% load eventsignal %}
|
||||||
{% block title %}{{ request.event.name }}{% endblock %}
|
{% block title %}{{ request.event.name }}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>
|
<h1>
|
||||||
@@ -63,6 +64,7 @@
|
|||||||
class="btn btn-primary">{% trans "Show affected orders" %}</a>
|
class="btn btn-primary">{% trans "Show affected orders" %}</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% eventsignal request.event "pretix.control.signals.event_dashboard_top" request=request %}
|
||||||
{% if actions|length > 0 %}
|
{% if actions|length > 0 %}
|
||||||
<div class="panel panel-danger">
|
<div class="panel panel-danger">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
|
|||||||
Reference in New Issue
Block a user