Folding of taq lists on main page.
[wolnelektury.git] / wolnelektury / templates / catalogue / folded_tag_list.html
diff --git a/wolnelektury/templates/catalogue/folded_tag_list.html b/wolnelektury/templates/catalogue/folded_tag_list.html
new file mode 100644 (file)
index 0000000..cd7a672
--- /dev/null
@@ -0,0 +1,20 @@
+{% load catalogue_tags %}
+{% if one_tag %}
+    <p>Zobacz całą kategorię <a href="{% catalogue_url one_tag %}">{{ one_tag }}</a>.</p>
+{% else %}
+    <div class="shown-tags">
+        <ul class="shown-tags">
+            {% for tag in shown_tags %}
+                <li><a href="{% catalogue_url choices tag %}">{{ tag }}&nbsp;({{ tag.count }})</a></li>
+            {% endfor %}
+        </ul>
+        {% if some_tags_hidden %}
+            <p><a href="#" class="show-all-tags">[Zobacz wszystkie]</a></p>
+        {% endif %}
+    </div>
+    <ul class="all-tags">
+        {% for tag in tags %}
+            <li><a href="{% catalogue_url choices tag %}">{{ tag }}&nbsp;({{ tag.count }})</a></li>
+        {% endfor %}      
+    </ul>    
+{% endif %}