diff --git a/shop/templates/order_list.html b/shop/templates/order_list.html
index 5cb88c17..41d65117 100644
--- a/shop/templates/order_list.html
+++ b/shop/templates/order_list.html
@@ -22,9 +22,9 @@
{{ order.id }} |
{{ order.get_number_of_items }} |
{{ order.total|currency }} |
- {{ order.open }} |
- {{ order.paid }} |
- {{ order.handed_out_status }} |
+ {{ order.open|truefalseicon }} |
+ {{ order.paid|truefalseicon }} |
+ {{ order.handed_out_status }} |
{% url 'shop:order_detail' pk=order.pk as order_detail_url %}
{% bootstrap_button "Order details" icon="th-list" href=order_detail_url button_class="btn-primary btn-sm" %}
diff --git a/shop/templatetags/shop_tags.py b/shop/templatetags/shop_tags.py
index 2aa6b95f..53eba18b 100644
--- a/shop/templatetags/shop_tags.py
+++ b/shop/templatetags/shop_tags.py
@@ -8,3 +8,10 @@ def currency(value):
return "{0:.2f} DKK".format(value)
+@register.filter(is_safe=True)
+def truefalseicon(value):
+ if value:
+ return "{% bootstrap_icon 'ok' %}"
+ else:
+ return "{% bootstrap_icon 'remove' %}"
+
|