diff --git a/src/pretix/control/signals.py b/src/pretix/control/signals.py index d9bf9e0319..e18ec79bf6 100644 --- a/src/pretix/control/signals.py +++ b/src/pretix/control/signals.py @@ -124,12 +124,13 @@ As with all plugin signals, the ``sender`` keyword argument will contain the eve """ organizer_edit_tabs = Signal( - providing_args=['organizer'] + providing_args=['organizer', 'request'] ) """ This signal is sent out to include tabs on the detail page of an organizer. Receivers should return a tuple with the first item being the tab title and the second item -being the content as HTML. The receivers get the ``organizer`` as a keyword argument. +being the content as HTML. The receivers get the ``organizer`` and the ``request`` as +keyword arguments. This is a regular django signal (no pretix event signal). """ diff --git a/src/pretix/control/templates/pretixcontrol/organizers/detail.html b/src/pretix/control/templates/pretixcontrol/organizers/detail.html index d4c9261d71..45c03b089c 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/detail.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/detail.html @@ -151,7 +151,7 @@ {% for title, content in tabs %}
- {{ field }} + {{ content }}
{% endfor %} diff --git a/src/pretix/control/views/organizer.py b/src/pretix/control/views/organizer.py index a15cd024fc..d421eefd31 100644 --- a/src/pretix/control/views/organizer.py +++ b/src/pretix/control/views/organizer.py @@ -14,6 +14,7 @@ from pretix.base.models import Organizer, OrganizerPermission, User from pretix.base.services.mail import SendMailException, mail from pretix.control.forms.organizer import OrganizerForm, OrganizerUpdateForm from pretix.control.permissions import OrganizerPermissionRequiredMixin +from pretix.control.signals import organizer_edit_tabs from pretix.helpers.urls import build_absolute_uri @@ -74,6 +75,12 @@ class OrganizerDetail(OrganizerPermissionRequiredMixin, DetailView): ctx['formset'] = self.formset ctx['add_form'] = self.add_form ctx['events'] = self.request.organizer.events.all() + ctx['tabs'] = [] + + for recv, retv in organizer_edit_tabs.send(sender=self.request.organizer, request=self.request, + organizer=self.request.organizer): + ctx['tabs'].append(retv) + return ctx def _send_invite(self, instance):