diff --git a/src/pretix/control/templates/pretixcontrol/events/index.html b/src/pretix/control/templates/pretixcontrol/events/index.html
index ae09794abb..4ef033f7f0 100644
--- a/src/pretix/control/templates/pretixcontrol/events/index.html
+++ b/src/pretix/control/templates/pretixcontrol/events/index.html
@@ -2,6 +2,7 @@
{% load i18n %}
{% load urlreplace %}
{% load bootstrap3 %}
+{% load static %}
{% block title %}{% trans "Events" %}{% endblock %}
{% block content %}
{% trans "Events" %}
@@ -74,6 +75,7 @@
{% endif %}
+ {% trans "Sales channels" %} |
{% trans "Start date" %}
@@ -108,6 +110,21 @@
{% endfor %}
{% if not hide_orga %} | {{ e.organizer }} | {% endif %}
+
+ {% for c in e.organizer.sales_channels.all %}
+ {% if e.all_sales_channels or c in e.limit_sales_channels.all %}
+ {% if "." in c.icon %}
+
+ {% else %}
+
+ {% endif %}
+ {% else %}
+
+ {% endif %}
+ {% endfor %}
+ |
{% if e.has_subevents %}
diff --git a/src/pretix/control/templates/pretixcontrol/organizers/detail.html b/src/pretix/control/templates/pretixcontrol/organizers/detail.html
index 7c2373e72b..a1315c8de1 100644
--- a/src/pretix/control/templates/pretixcontrol/organizers/detail.html
+++ b/src/pretix/control/templates/pretixcontrol/organizers/detail.html
@@ -1,6 +1,7 @@
{% extends "pretixcontrol/organizers/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
+{% load static %}
{% block inner %}
{% blocktrans with name=request.organizer.name %}Organizer: {{ name }}{% endblocktrans %}
@@ -62,6 +63,7 @@
| {% trans "Event name" %} |
+ {% trans "Sales channels" %} |
{% trans "Start date" %}
/
@@ -77,10 +79,30 @@
|
{{ e.name }}
- {{ e.slug }}
- {% for k, v in e.meta_data.items %}
- {% if v %}
- · {{ k }}: {{ v }}
+
+
+ {{ e.slug }}
+
+
+ {% for k, v in e.meta_data.items %}
+ {% if v %}
+ · {{ k }}: {{ v }}
+ {% endif %}
+ {% endfor %}
+
+ |
+
+ {% for c in sales_channels %}
+ {% if e.all_sales_channels or c in e.limit_sales_channels.all %}
+ {% if "." in c.icon %}
+
+ {% else %}
+
+ {% endif %}
+ {% else %}
+
{% endif %}
{% endfor %}
|
diff --git a/src/pretix/control/views/main.py b/src/pretix/control/views/main.py
index 8f0455818d..e56677b895 100644
--- a/src/pretix/control/views/main.py
+++ b/src/pretix/control/views/main.py
@@ -67,7 +67,12 @@ class EventList(PaginationMixin, ListView):
def get_queryset(self):
qs = self.request.user.get_events_with_any_permission(self.request).prefetch_related(
- 'organizer', '_settings_objects', 'organizer___settings_objects', 'organizer__meta_properties',
+ 'organizer',
+ 'organizer__sales_channels',
+ '_settings_objects',
+ 'organizer___settings_objects',
+ 'organizer__meta_properties',
+ 'limit_sales_channels',
Prefetch(
'meta_values',
EventMetaValue.objects.select_related('property'),
diff --git a/src/pretix/control/views/organizer.py b/src/pretix/control/views/organizer.py
index 94c77812c4..6ff0d80706 100644
--- a/src/pretix/control/views/organizer.py
+++ b/src/pretix/control/views/organizer.py
@@ -207,6 +207,7 @@ class OrganizerDetail(OrganizerDetailViewMixin, OrganizerPermissionRequiredMixin
'organizer').prefetch_related(
'organizer', '_settings_objects', 'organizer___settings_objects',
'organizer__meta_properties',
+ 'limit_sales_channels',
Prefetch(
'meta_values',
EventMetaValue.objects.select_related('property'),
@@ -237,6 +238,7 @@ class OrganizerDetail(OrganizerDetailViewMixin, OrganizerPermissionRequiredMixin
self.filter_form['meta_{}'.format(p.name)] for p in
self.organizer.meta_properties.filter(filter_allowed=True)
]
+ ctx['sales_channels'] = self.request.organizer.sales_channels.all()
return ctx
|