Removed catalogue.lib package.
[wolnelektury.git] / templates / catalogue / main_page.html
1 {% extends "base.html" %}
2 {% load catalogue_tags chunks cache %}
3
4 {% block bodyid %}main-page{% endblock %}
5
6 {% block extrahead %}
7     <script type="text/javascript" charset="utf-8">
8         $(function() {
9             $('#categories-list ul').columnize({width: 180});
10             $('#themes-list ul').columnize({width: 180});
11         });
12     </script>
13 {% endblock %}
14
15 {% block body %}
16     <div id="site-description">
17         {% chunk "site-description" %}
18     </div>
19     <div class="clearboth"></div>
20     <form action="{% url search %}" method="get" accept-charset="utf-8" id="search-form">
21         <p>{{ form.q }} {{ form.tags }} <input type="submit" value="Szukaj" /> <strong>lub</strong> <a href="{% url catalogue.views.book_list %}">zobacz spis utworów</a> w naszym zbiorze</p>
22     </form>
23     
24     <div id="tags-list">
25         <div id="categories-list">
26             {% if categories.set %}
27                 <h2>Zestawy</h2>
28                 <ul>
29                 {% for set in categories.set %}
30                     <li><a href="{% catalogue_url set %}">{{ set }}&nbsp;({{ set.count }})</a></li>
31                 {% endfor %}
32                 </ul>
33             {% endif %}
34             
35             {% if categories.author %}
36                 <h2>Autorzy</h2>
37                 <ul>
38                 {% for author in categories.author %}
39                     <li><a href="{% catalogue_url author %}">{{ author }}&nbsp;({{ author.count }})</a></li>
40                 {% endfor %}
41                 </ul>
42             {% endif %}
43             
44             {% if categories.epoch %}
45             <h2>Epoki</h2>
46                 <ul>
47                 {% for epoch in categories.epoch %}
48                     <li><a href="{% catalogue_url epoch %}">{{ epoch }}&nbsp;({{ epoch.count }})</a></li>
49                 {% endfor %}
50                 </ul>                
51             {% endif %}
52             
53             {% if categories.kind %}
54                 <h2>Rodzaje</h2>
55                 <ul>
56                 {% for kind in categories.kind %}
57                     <li><a href="{% catalogue_url kind %}">{{ kind }}&nbsp;({{ kind.count }})</a></li>
58                 {% endfor %}
59                 </ul>                
60             {% endif %}
61             
62             {% if categories.genre %}
63                 <h2>Gatunki literackie</h2>
64                 <ul>
65                 {% for genre in categories.genre %}
66                     <li><a href="{% catalogue_url genre %}">{{ genre }}&nbsp;({{ genre.count }})</a></li>
67                 {% endfor %}
68                 </ul>                
69             {% endif %}
70         </div>
71         <div id="themes-list">
72             {% if categories.theme %}
73                 <h2>Motywy</h2>
74                 <ul>
75                 {% for theme in categories.theme %}
76                     <li><a href="{% catalogue_url theme %}">{{ theme }}&nbsp;({{ theme.count }})</a></li>
77                 {% endfor %}
78                 </ul>                
79             {% endif %}
80         </div>
81         <div class="clearboth"></div>
82     </div>
83     
84     <div id="latest-blog-posts">
85         <h2>Aktualności z naszego bloga</h2>
86         {% cache 1800 latest-blog-posts %}
87         {% latest_blog_posts "http://wolnepodreczniki.pl/feed/?s=Wolne%20Lektury" %}
88         {% endcache %}
89     </div>
90 {% endblock %}