Add Book.ancestor m2m.
[wolnelektury.git] / apps / catalogue / templates / catalogue / tag_list.html
index 87097b1..2143048 100644 (file)
@@ -6,11 +6,11 @@
     <ul>
        {% if choices %}
         {% for tag in tags %}
-            <li><a href="{% catalogue_url choices tag %}">{{ tag }}&nbsp;({{ tag.count }})</a></li>
+            <li><a href="{% catalogue_url choices tag %}">{{ tag }}{% if tag.count %}&nbsp;({{ tag.count }}){% endif %}</a></li>
         {% endfor %}
         {% else %}
         {% for tag in tags %}
-            <li><a href="{{ tag.get_absolute_url }}">{{ tag }}&nbsp;({{ tag.count }})</a></li>
+            <li><a href="{{ tag.get_absolute_url }}">{{ tag }}{% if tag.count %}&nbsp;({{ tag.count }}){% endif %}</a></li>
         {% endfor %}
         {% endif %}
     </ul>