[Categories] use categories from Django ORM
[mygpo.git] / mygpo / directory / templates / category.html
blobd91b84eda406115415ecc27a2fe82a906418aa3f
1 {% extends "base.html" %}
3 {% load i18n %}
4 {% load podcasts %}
5 {% load charts %}
6 {% load math %}
7 {% load utils %}
9 {% load menu %}
10 {% block mainmenu %}{{ "/directory/"|main_menu }}{% endblock %}
11 {% block sectionmenu %}{{ "/directory/"|section_menu:category }}{% endblock %}
13 {% block title %}{{ category }}{% endblock %}
15 {% block header %}
16 <h1>{{ category }}</h1>
17 {% endblock %}
20 {% block content %}
22 <table class="list">
23 <tr>
24 <th></th>
25 <th></th>
26 <th></th>
27 </tr>
28 {% for entry in entries %}
29 <tr>
30 <td class="logo">{{ entry.podcast|podcast_logo}}</td>
31 <td>{% podcast_group_link entry.podcast %}</td>
32 <td class="description">
33 {{ entry.podcast.description|truncatewords:15 }}
34 </td>
35 </tr>
36 {% endfor %}
37 </table>
39 <ul class="pagination">
40 {% if entries.has_previous %}
41 <li><a href="{% url "directory" category %}?page={{ entries.previous_page_number }}">«</a></li>
42 {% endif %}
44 {% for page in page_list %}
45 <li>
46 {% if page == "..." %}
47 <span>{{ page }}</span>
48 {% else %}
50 {% if page == entries.number %}
51 <strong>{{ page }}</strong>
52 {% else %}
53 <a href="{% url "directory" category %}?page={{ page }}">{{ page }}</a>
54 {% endif %}
55 {% endif %}
56 </li>
57 {% endfor %}
59 {% if entries.has_next %}
60 <li>
61 <a href="{% url "directory" category %}?page={{ entries.next_page_number }}">»</a>
62 </li>
63 {% endif %}
64 </ul>
66 {% endblock %}