forked from CGM_Public/pretix_original
Show ticket code in check-in list
This commit is contained in:
@@ -70,6 +70,7 @@
|
|||||||
<a href="?{% url_replace request 'ordering' 'email'%}"><i class="fa fa-caret-up"></i></a></th>
|
<a href="?{% url_replace request 'ordering' 'email'%}"><i class="fa fa-caret-up"></i></a></th>
|
||||||
<th>{% trans "Name" %} <a href="?{% url_replace request 'ordering' '-name'%}"><i class="fa fa-caret-down"></i></a>
|
<th>{% trans "Name" %} <a href="?{% url_replace request 'ordering' '-name'%}"><i class="fa fa-caret-down"></i></a>
|
||||||
<a href="?{% url_replace request 'ordering' 'name'%}"><i class="fa fa-caret-up"></i></a></th>
|
<a href="?{% url_replace request 'ordering' 'name'%}"><i class="fa fa-caret-up"></i></a></th>
|
||||||
|
<th>{% trans "Ticket code" %}</th>
|
||||||
<th>{% trans "Status" %} <a href="?{% url_replace request 'ordering' '-status'%}"><i class="fa fa-caret-down"></i></a>
|
<th>{% trans "Status" %} <a href="?{% url_replace request 'ordering' '-status'%}"><i class="fa fa-caret-down"></i></a>
|
||||||
<a href="?{% url_replace request 'ordering' 'status'%}"><i class="fa fa-caret-up"></i></a></th>
|
<a href="?{% url_replace request 'ordering' 'status'%}"><i class="fa fa-caret-up"></i></a></th>
|
||||||
<th>{% trans "Timestamp" %} <a href="?{% url_replace request 'ordering' '-timestamp'%}"><i class="fa fa-caret-down"></i></a>
|
<th>{% trans "Timestamp" %} <a href="?{% url_replace request 'ordering' '-timestamp'%}"><i class="fa fa-caret-down"></i></a>
|
||||||
@@ -102,6 +103,9 @@
|
|||||||
{{ e.attendee_name }}
|
{{ e.attendee_name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ e.secret|slice:":10" }}…
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if not e.last_checked_in %}
|
{% if not e.last_checked_in %}
|
||||||
<span class="label label-danger">{% trans "Not checked in" %}</span>
|
<span class="label label-danger">{% trans "Not checked in" %}</span>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-condensed table-hover">
|
<table class="table table-condensed table-hover table-orders">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Order code" %}
|
<th>{% trans "Order code" %}
|
||||||
@@ -147,6 +147,30 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
{% if sums %}
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th>{% trans "Sum over all pages" %}</th>
|
||||||
|
<th></th>
|
||||||
|
<th>
|
||||||
|
{% blocktrans trimmed count s=sums.c %}
|
||||||
|
1 order
|
||||||
|
{% plural %}
|
||||||
|
{{ s }} orders
|
||||||
|
{% endblocktrans %}
|
||||||
|
</th>
|
||||||
|
<th class="text-right">
|
||||||
|
{{ sums.s|money:request.event.currency }}
|
||||||
|
</th>
|
||||||
|
<th class="text-right">
|
||||||
|
{% if sums.pc %}
|
||||||
|
{{ sums.pc }}
|
||||||
|
{% endif %}
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
{% include "pretixcontrol/pagination.html" %}
|
{% include "pretixcontrol/pagination.html" %}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from django.core.files import File
|
|||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.db.models import (
|
from django.db.models import (
|
||||||
Count, IntegerField, OuterRef, ProtectedError, Q, Subquery,
|
Count, IntegerField, OuterRef, ProtectedError, Q, Subquery,
|
||||||
)
|
Sum)
|
||||||
from django.http import (
|
from django.http import (
|
||||||
FileResponse, Http404, HttpResponseNotAllowed, JsonResponse,
|
FileResponse, Http404, HttpResponseNotAllowed, JsonResponse,
|
||||||
)
|
)
|
||||||
@@ -126,6 +126,15 @@ class OrderList(EventPermissionRequiredMixin, PaginationMixin, ListView):
|
|||||||
o.has_external_refund = annotated.get(o.pk)['has_external_refund']
|
o.has_external_refund = annotated.get(o.pk)['has_external_refund']
|
||||||
o.has_pending_refund = annotated.get(o.pk)['has_pending_refund']
|
o.has_pending_refund = annotated.get(o.pk)['has_pending_refund']
|
||||||
|
|
||||||
|
if ctx['page_obj'].paginator.count < 1000:
|
||||||
|
# Performance safeguard: Only count positions if the data set is small
|
||||||
|
ctx['sums'] = self.get_queryset().annotate(
|
||||||
|
pcnt=Subquery(s, output_field=IntegerField())
|
||||||
|
).aggregate(
|
||||||
|
s=Sum('total'), pc=Sum('pcnt'), c=Count('id')
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
ctx['sums'] = self.get_queryset().aggregate(s=Sum('total'), c=Count('id'))
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
|
|||||||
Reference in New Issue
Block a user