fixed when no collections
authorJan Szejko <j-sz@o2.pl>
Tue, 5 Jan 2016 14:21:36 +0000 (15:21 +0100)
committerJan Szejko <j-sz@o2.pl>
Tue, 5 Jan 2016 14:21:36 +0000 (15:21 +0100)
src/wolnelektury/templates/main_page.html

index 44f05a8..c037b9f 100755 (executable)
         <a class="more" href="{% url 'epoch_catalogue' %}">Zobacz katalog epok</a>
     </section>
 
-    <section>
-        <h1>Kolekcje</h1>
-        {% ssi_include 'catalogue_collection_box' pk=collection.pk %}
-        <a class="more" href="{% url 'catalogue_collections' %}">Zobacz katalog kolekcji</a>
-    </section>
+    {% if collection %}
+        <section>
+            <h1>Kolekcje</h1>
+            {% ssi_include 'catalogue_collection_box' pk=collection.pk %}
+            <a class="more" href="{% url 'catalogue_collections' %}">Zobacz katalog kolekcji</a>
+        </section>
+    {% endif %}
 
     <section>
         <h1>{% trans "Recent publications" %}</h1>