{% extends "pretixcontrol/organizers/base.html" %} {# Owner: frontend-dev (ORCHESTRIERUNG.md section 5) #} {% comment %} Pick the reference event for the template editor. A template has no event, but a field library only exists for one: which questions, items and meta properties exist is event data. So the editor works against one event of this organizer, and this page is where that event is chosen. views/editor.py skips this page when there is exactly one usable event -- an in-between page with a single option is friction, not a choice. method="get" on purpose: the answer belongs in the URL as ?reference_event=, which makes the editor's address bookmarkable and means this page needs no view logic of its own. No CSRF token for the same reason -- a GET form changes nothing. An empty event list is not an error page but this same page with the explanation: the plugin is active somewhere in this organizer (otherwise the view answers 404), but this user cannot read orders in any of those events, and the preview would show nothing but 403s. {% endcomment %} {% load i18n %} {% block title %}{% trans "Template editor" %}{% endblock %} {% block inner %}

{% trans "Template editor" %}

{% if template %}

{% blocktrans trimmed with name=report_name %} Template: {{ name }} {% endblocktrans %}

{% endif %} {% if events %}

{% blocktrans trimmed %} Report templates live at organizer level and have no event of their own. The editor therefore needs a reference event: its questions, products and meta properties make up the field library, and the live preview shows that event's orders. Pick the event that resembles the events you want to use this template in. {% endblocktrans %}

{% blocktrans trimmed %} The choice is not stored with the template. Fields whose filter values only exist in one event are marked “event values” in the editor and are remapped when the template is loaded into another event. {% endblocktrans %}

{% if list_url %} {% trans "Cancel" %} {% endif %}
{% else %}
{% blocktrans trimmed %} There is no event you could use as a reference. The template editor needs an event of this organizer that has the report plugin enabled and whose orders you are allowed to view, because the field library and the live preview come from that event. {% endblocktrans %}

{% blocktrans trimmed %} Ask for permission to view orders in one of these events, or edit the template's JSON definition directly. {% endblocktrans %}

{% if list_url %} {% trans "Back to the templates" %} {% endif %} {% endif %} {% endblock %}