show if a ticket is used or not

This commit is contained in:
Thomas Steen Rasmussen 2017-04-02 21:40:44 +02:00
parent 39b2963b18
commit 3f69d8521e
2 changed files with 9 additions and 1 deletions

View file

@ -14,7 +14,7 @@
<div class="col-md-7"> <div class="col-md-7">
<div class="pull-right"> <div class="pull-right">
<h2>{{ ticket.order.camp }}</h2> <h2>{% if ticket.checked_in %}This ticket has been used{% else %}This ticket is unused{% endif %}</h2>
<form method="POST" class="form"> <form method="POST" class="form">
{% csrf_token %} {% csrf_token %}
{% bootstrap_field form.name %} {% bootstrap_field form.name %}

View file

@ -14,6 +14,8 @@
Product name Product name
<th> <th>
Price Price
<th>
Checked in
<tbody> <tbody>
{% for ticket in tickets %} {% for ticket in tickets %}
@ -33,6 +35,12 @@
</a> </a>
<td> <td>
{{ ticket.product.price|currency }} {{ ticket.product.price|currency }}
<td>
{% if ticket.checked_in %}
Yes
{% else %}
Not yet
{% endif %}
{% endfor %} {% endfor %}
</table> </table>