bornhack-website/src/backoffice/templates/infodesk.html

53 lines
1.4 KiB
HTML

{% extends 'base.html' %}
{% load commonmark %}
{% load static from staticfiles %}
{% load imageutils %}
{% block extra_head %}
<script src="{% static "js/jquery.dataTables.min.js" %}"></script>
<link rel="stylesheet" href="{% static 'css/jquery.dataTables.min.css' %}">
{% endblock extra_head %}
{% block content %}
<div class="row">
<h2>Infodesk Backoffice</h2>
<div class="lead">
Paid (and not later refunded) orders with at least one product that is not yet handed out
</div>
</div>
<div class="row">
<table class="table table-hover">
<thead>
<tr>
<th>Order</th>
<th>User</th>
<th>OPR Id</th>
<th>Product</th>
<th>Quantity</th>
<th>Handed Out?</th>
</tr>
</thead>
<tbody>
{% for order in order_list %}
{% for productrel in order.orderproductrelation_set.all %}
<tr>
<td><a href="/admin/shop/order/{{ order.id }}/change/">Order #{{ order.id }}</a></td>
<td>{{ order.user }}</td>
<td>{{ productrel.id }}</td>
<td>{{ productrel.product.name }}</td>
<td>{{ productrel.quantity }}</td>
<td>{{ productrel.handed_out }}</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
<script>
$(document).ready(function(){
$('.table').DataTable();
});
</script>
{% endblock content %}