diff --git a/src/pretix/control/signals.py b/src/pretix/control/signals.py index cf3e011084..86734c0eb9 100644 --- a/src/pretix/control/signals.py +++ b/src/pretix/control/signals.py @@ -94,6 +94,7 @@ should return a list of dictionaries, where each dictionary can have the keys: * link (str, optional, if the full widget should be a link) As with all plugin signals, the ``sender`` keyword argument will contain the event. +An additional keyword argument ``subevent`` *can* contain a sub-event. """ user_dashboard_widgets = Signal( diff --git a/src/pretix/control/templates/pretixcontrol/event/fragment_subevent_choice_simple.html b/src/pretix/control/templates/pretixcontrol/event/fragment_subevent_choice_simple.html index a47dff1b84..ec961ca88e 100644 --- a/src/pretix/control/templates/pretixcontrol/event/fragment_subevent_choice_simple.html +++ b/src/pretix/control/templates/pretixcontrol/event/fragment_subevent_choice_simple.html @@ -9,5 +9,5 @@ {% endfor %} - +

diff --git a/src/pretix/control/templates/pretixcontrol/event/index.html b/src/pretix/control/templates/pretixcontrol/event/index.html index 6f0455c1ac..91278cbf34 100644 --- a/src/pretix/control/templates/pretixcontrol/event/index.html +++ b/src/pretix/control/templates/pretixcontrol/event/index.html @@ -39,7 +39,12 @@ {% endif %} -
+ {% if request.event.has_subevents %} +
+ {% include "pretixcontrol/event/fragment_subevent_choice_simple.html" %} +
+ {% endif %} +
{% for w in widgets %}
{% if w.url %}{# backwards compatibility #} diff --git a/src/pretix/control/views/dashboards.py b/src/pretix/control/views/dashboards.py index ef6f91af33..7de5f2d228 100644 --- a/src/pretix/control/views/dashboards.py +++ b/src/pretix/control/views/dashboards.py @@ -16,7 +16,7 @@ from django.utils.html import escape from django.utils.translation import ugettext_lazy as _, ungettext from pretix.base.models import ( - Event, Item, Order, OrderPosition, RequiredAction, Voucher, + Event, Item, Order, OrderPosition, RequiredAction, SubEvent, Voucher, WaitingListEntry, ) from pretix.control.forms.event import CommentForm @@ -31,25 +31,37 @@ NUM_WIDGET = '
{num}