Show Subevent start time in select2-pickers (#1630)

* Add Subevent time to __str__

* Show subevent-dates in select2 picker

* Show event-dateblock (if enabled) on Widget Voucher redemption page

* Update src/pretix/base/models/event.py

Co-Authored-By: Raphael Michel <michel@rami.io>

* Update src/pretix/control/templates/pretixcontrol/vouchers/index.html

Co-Authored-By: Raphael Michel <michel@rami.io>

* Update src/pretix/control/views/typeahead.py

Co-Authored-By: Raphael Michel <michel@rami.io>

* Remove date-block on non-subevent voucher redemption pages

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Martin Gross
2020-03-26 13:10:45 +01:00
committed by GitHub
parent 0ee502abec
commit 242ebdfae9
4 changed files with 58 additions and 5 deletions

View File

@@ -171,7 +171,12 @@
{% if v.seat %}<br><small class="text-muted">{{ v.seat }}</small>{% endif %}
</td>
{% if request.event.has_subevents %}
<td>{{ v.subevent.name }} {{ v.subevent.get_date_range_display }}</td>
<td>
{{ v.subevent.name }} {{ v.subevent.get_date_range_display }}
{% if request.event.settings.show_times %}
{{ v.subevent.date_from|date:"TIME_FORMAT" }}
{% endif %}
</td>
{% endif %}
<td class="text-right flip">
<a href="{% url "control:event.vouchers.bulk" organizer=request.event.organizer.slug event=request.event.slug %}?copy_from={{ v.id }}"