From 3f69d8521eaccdebb9e3332d3824dc2252813ede Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 2 Apr 2017 21:40:44 +0200 Subject: [PATCH] show if a ticket is used or not --- src/shop/templates/ticket_detail.html | 2 +- src/shop/templates/ticket_list.html | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/shop/templates/ticket_detail.html b/src/shop/templates/ticket_detail.html index 1176de3f..88df2c72 100644 --- a/src/shop/templates/ticket_detail.html +++ b/src/shop/templates/ticket_detail.html @@ -14,7 +14,7 @@
-

{{ ticket.order.camp }}

+

{% if ticket.checked_in %}This ticket has been used{% else %}This ticket is unused{% endif %}

{% csrf_token %} {% bootstrap_field form.name %} diff --git a/src/shop/templates/ticket_list.html b/src/shop/templates/ticket_list.html index 61541fe8..25273fbc 100644 --- a/src/shop/templates/ticket_list.html +++ b/src/shop/templates/ticket_list.html @@ -14,6 +14,8 @@ Product name Price + + Checked in {% for ticket in tickets %} @@ -33,6 +35,12 @@ {{ ticket.product.price|currency }} + + {% if ticket.checked_in %} + Yes + {% else %} + Not yet + {% endif %} {% endfor %}