mirror of
https://github.com/nanoy42/coope
synced 2024-11-05 01:16:28 +00:00
Only show category when not empty
This commit is contained in:
parent
acf770a4ef
commit
9c8487efec
1 changed files with 4 additions and 2 deletions
|
@ -142,6 +142,7 @@
|
|||
</tr>
|
||||
{% endif %}
|
||||
{% for category in categories %}
|
||||
{% if category.active_products.count > 0 %}
|
||||
<tr style="text-align:center; font-weight:bold;"><td colspan="4">{{category}}</td></tr>
|
||||
{% for product in category.active_products %}
|
||||
{% if forloop.counter0|divisibleby:4 %}
|
||||
|
@ -151,6 +152,7 @@
|
|||
{% if forloop.counter|divisibleby:4 %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if not category.active_products|divisibleby:4 %}
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue