Moved project files to wolnelektury directory.
[wolnelektury.git] / wolnelektury / templates / catalogue / book_list.html
diff --git a/wolnelektury/templates/catalogue/book_list.html b/wolnelektury/templates/catalogue/book_list.html
new file mode 100644 (file)
index 0000000..f4f575c
--- /dev/null
@@ -0,0 +1,35 @@
+{% extends "base.html" %}
+{% load catalogue_tags chunks %}
+
+{% block bodyid %}book-a-list{% endblock %}
+
+{% block title %}Alfabetyczny spis utworów w WolneLektury.pl{% endblock %}
+
+{% block extrahead %}
+    <script type="text/javascript" charset="utf-8">
+        $(function() {
+            $('#book-list .group').addClass('dontsplit');
+            $('#book-list').columnize({columns: 3});
+        });
+    </script>
+{% endblock %}
+
+{% block body %}
+    <h1>Alfabetyczny spis utworów</h1>
+    <form action="{% url search %}" method="GET" accept-charset="utf-8" id="search-form">
+        <p>{{ form.q }} <input type="submit" value="Szukaj" /> <strong>lub</strong> <a href="{% url main_page %}">wróć do strony głównej</a></p>
+    </form>
+    
+    <div id="book-list">
+        {% for first_letter, group in books_by_first_letter.items %}
+        <div class="group">
+            <h2>{{ first_letter }}</h2>
+            <ol>
+            {% for book in group %}
+                <li><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></li>
+            {% endfor %}
+            </ol>
+        </div>
+        {% endfor %}    
+    </div>
+{% endblock %}