diff --git a/doc/development/api/general.rst b/doc/development/api/general.rst index 8fffe2771..4a9b9d1d5 100644 --- a/doc/development/api/general.rst +++ b/doc/development/api/general.rst @@ -47,7 +47,7 @@ Backend ------- .. automodule:: pretix.control.signals - :members: nav_event, html_head, quota_detail_html, nav_topbar + :members: nav_event, html_head, quota_detail_html, nav_topbar, organizer_edit_tabs .. automodule:: pretix.base.signals diff --git a/src/pretix/control/signals.py b/src/pretix/control/signals.py index 7d6edb1b5..d9bf9e031 100644 --- a/src/pretix/control/signals.py +++ b/src/pretix/control/signals.py @@ -122,3 +122,14 @@ quota as argument in the ``quota`` keyword argument. As with all plugin signals, the ``sender`` keyword argument will contain the event. """ + +organizer_edit_tabs = Signal( + providing_args=['organizer'] +) +""" +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. + +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 9b8a7a524..d4c9261d7 100644 --- a/src/pretix/control/templates/pretixcontrol/organizers/detail.html +++ b/src/pretix/control/templates/pretixcontrol/organizers/detail.html @@ -6,15 +6,32 @@

{% blocktrans with name=organizer.name %}Organizer: {{ name }}{% endblocktrans %} + class="btn btn-default"> {% trans "Edit" %}

-
-
-
- {% trans "Events" %} + + +
+
+
{% if events|length == 0 %}

{% trans "You currently do not have access to any events." %} @@ -31,7 +48,8 @@ {% for e in events %} - {{ e.name }} + {{ e.name }} {{ e.get_date_from_display }} @@ -43,24 +61,25 @@ {% trans "Create a new event" %} -

+
- {% if request.orgaperm.can_change_permissions %} -
-
- {% csrf_token %} -
- {% trans "Team" %} +
+
+ + {% csrf_token %}

{% blocktrans trimmed %} - You can use the following list to control who can create new events in the name of this - organizer and who can add more people to this list. This does not + You can use the following list to control who can create new events in the name of + this organizer and who can add more people to this list. This does not control who has access to a particular event. You can control the access to an - event in the "Permissions" section of the event's settings. A user does not need to be - on the list here to get access to an event. + event in the "Permissions" section of the event's settings. A user does not need to + be on the list here to get access to an event. {% endblocktrans %}

+

+ {% trans "Everyone on this list can control the organizer settings on this page." %} +

{% bootstrap_formset_errors formset %} {{ formset.management_form }} @@ -84,7 +103,7 @@ {% else %} {{ form.instance.invite_email }} + title="{% trans "invited, pending response" %}"> {% endif %} {{ form.can_create_events }} @@ -98,9 +117,9 @@ {% trans "Adding a new user" %}
{% blocktrans trimmed %} - To add a new user, you can enter their email address here. If they already have a - pretix account, they will immediately be added to the team. Otherwise, they will - be sent an email with an invitation. + To add a new user, you can enter their email address here. If they + already have a pretix account, they will immediately be added to the team. + Otherwise, they will be sent an email with an invitation. {% endblocktrans %} @@ -125,9 +144,16 @@
-
-
+ +
{% endif %} + {% for title, content in tabs %} +
+
+ {{ field }} +
+
+ {% endfor %} {% endblock %} diff --git a/src/pretix/static/pretixcontrol/scss/main.scss b/src/pretix/static/pretixcontrol/scss/main.scss index 484910a40..9c7a1bc0f 100644 --- a/src/pretix/static/pretixcontrol/scss/main.scss +++ b/src/pretix/static/pretixcontrol/scss/main.scss @@ -91,6 +91,9 @@ h1 .btn-sm { } } +.organizer-tabs .tab-inner { + padding-top: 20px; +} .helper-display-inline { display: inline !important;