forked from CGM_Public/pretix_original
* Data model draft * Refactor query and assignment usages of old permissions * Backend UI * API serializer * Big string replace * Docs, tests and fixes for teams api * Update docs for device auth * Eliminate old names * Make tests pass * Use new permissions, remove inconsistencies * Add test for translations * Show plugin permissions * Add permission for seating plans * Fix plugin activation * Fix failing test * Refactor to permission groups * Update doc/api/resources/devices.rst Co-authored-by: luelista <weller@rami.io> * Update doc/api/resources/events.rst Co-authored-by: luelista <weller@rami.io> * Update src/pretix/api/serializers/organizer.py Co-authored-by: luelista <weller@rami.io> * Fix typo * Fix python version compat * Replacement after rebase * Add proper permission handling for exports * Docs for exporters * Runtime linting of permission names * Fix typos * Show export page even without orders permission * More legacy compat * Do not strongly validate before plugins are loaded * Rebase migration * Add permission for outgoing mails * Review notes * Update doc/api/resources/teams.rst Co-authored-by: Richard Schreiber <schreiber@pretix.eu> * Clean up logic around exporters * Review and failures * Fix migration leading to forbidden combination * Handle permissions on event copying * Remove print-statements * Make test clearer * Review feedback * Add AnyPermissionOf * migration safety --------- Co-authored-by: luelista <weller@rami.io> Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
110 lines
5.6 KiB
HTML
110 lines
5.6 KiB
HTML
{% extends "pretixcontrol/items/base.html" %}
|
|
{% load i18n %}
|
|
{% block title %}{% trans "Questions" %}{% endblock %}
|
|
{% block inside %}
|
|
<h1>{% trans "Questions" %}</h1>
|
|
<p>
|
|
{% blocktrans trimmed %}
|
|
Questions allow your attendees to fill in additional data about their ticket. If you provide food, one
|
|
example might be to ask your users about dietary requirements.
|
|
{% endblocktrans %}
|
|
</p>
|
|
{% csrf_token %}
|
|
{% if 'event.items:write' in request.eventpermset %}
|
|
<p>
|
|
<a href="{% url "control:event.items.questions.add" organizer=request.event.organizer.slug event=request.event.slug %}" class="btn btn-default"><i class="fa fa-plus"></i> {% trans "Create a new question" %}
|
|
</a>
|
|
</p>
|
|
{% endif %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover table-quotas">
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans "Question" %}</th>
|
|
<th>{% trans "Type" %}</th>
|
|
<th class="iconcol"></th>
|
|
<th class="iconcol"></th>
|
|
<th class="iconcol"></th>
|
|
<th>{% trans "Products" %}</th>
|
|
{% if 'event.items:write' in request.eventpermset %}
|
|
<th class="action-col-2"></th>
|
|
{% endif %}
|
|
<th class="action-col-2"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody data-dnd-url="{% url "control:event.items.questions.reorder" organizer=request.event.organizer.slug event=request.event.slug %}">
|
|
{% for q in questions %}
|
|
<tr data-dnd-id="{{ q.id }}">
|
|
<td>
|
|
<strong>
|
|
{% if q.pk %}
|
|
<a href="{% url "control:event.items.questions.show" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}">
|
|
{% endif %}
|
|
{{ q.question }}
|
|
{% if q.pk %}
|
|
</a>
|
|
{% endif %}
|
|
</strong><br>
|
|
<small class="text-muted">{{ q.identifier }}</small>
|
|
</td>
|
|
<td>
|
|
{% if q.pk %}
|
|
{{ q.get_type_display }}
|
|
{% else %}
|
|
{% trans "System question" %}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if q.required %}
|
|
<span class="fa fa-exclamation-circle text-muted" data-toggle="tooltip" title="{% trans "Required question" %}"></span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if q.pk and q.ask_during_checkin %}
|
|
<span class="fa fa-check-square text-muted" data-toggle="tooltip" title="{% trans "Ask during check-in" %}"></span>
|
|
{% endif %}
|
|
|
|
</td>
|
|
<td>
|
|
{% if q.pk and q.hidden %}
|
|
<span class="fa fa-eye-slash text-muted" data-toggle="tooltip" title="{% trans "Hidden question" %}"></span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if q.pk %}
|
|
<ul>
|
|
{% for item in q.items.all %}
|
|
<li>
|
|
<a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=item.id %}">{{ item }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<small>{% trans "All personalized products" %}</small>
|
|
{% endif %}
|
|
</td>
|
|
{% if 'event.items:write' in request.eventpermset %}
|
|
<td class="dnd-container">
|
|
</td>
|
|
{% endif %}
|
|
<td class="text-right flip">
|
|
{% if q.pk %}
|
|
<a href="{% url "control:event.items.questions.show" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-default btn-sm"><i class="fa fa-bar-chart"></i></a>
|
|
{% if 'event.items:write' in request.eventpermset %}
|
|
<a href="{% url "control:event.items.questions.edit" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
|
|
<a href="{% url "control:event.items.questions.delete" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
|
|
{% endif %}
|
|
{% else %}
|
|
{% if 'event.settings.general:write' in request.eventpermset %}
|
|
<a href="{% url "control:event.settings" organizer=request.event.organizer.slug event=request.event.slug %}#tab-0-2-open"
|
|
class="btn btn-default btn-sm"><i class="fa fa-wrench"></i></a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|