Improve transaction overview on landing page
This commit is contained in:
@@ -52,6 +52,16 @@
|
||||
</small>
|
||||
{% if transaction.type == "order" %}
|
||||
<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>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user