Improve transaction overview on landing page

This commit is contained in:
2026-02-14 14:25:53 +01:00
parent b791c490b7
commit c053b3b91e

View File

@@ -52,6 +52,16 @@
</small> </small>
{% if transaction.type == "order" %} {% if transaction.type == "order" %}
<div class="mt-2"> <div class="mt-2">
{% if transaction.order and transaction.order.items|length > 0 %}
<div class="small text-muted mb-2">
{% for item in transaction.order.items[:3] %}
{{ item.product.name }}{% if loop.index < transaction.order.items[:3]|length %},{% endif %}
{% endfor %}
{% if transaction.order.items|length > 3 %}
<div class="text-muted">+ {{ transaction.order.items|length - 3 }} weitere{% if transaction.order.items|length - 3 == 1 %} Artikel{% else %} Artikel{% endif %}</div>
{% endif %}
</div>
{% endif %}
<a href="/shop/order/{{ transaction.order_id }}" class="btn btn-sm btn-outline-primary">Einkauf ansehen</a> <a href="/shop/order/{{ transaction.order_id }}" class="btn btn-sm btn-outline-primary">Einkauf ansehen</a>
</div> </div>
{% endif %} {% endif %}