fix pagination links
[mygpo.git] / mygpo / directory / templates / category.html
blob31858fdf64c8c2f4f7baead26b2422f7851948e1
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_logo}}</td>
31 <td>{% podcast_group_link entry %}</td>
32 <td class="description">
33 {{ entry.description|truncatewords:15 }}
34 </td>
35 </tr>
36 {% endfor %}
37 </table>
39 <div class="pagination pagination-centered">
40 <ul>
41 {% if entries.has_previous %}
42 <li><a href="{% url "directory" category %}?page={{ entries.previous_page_number }}">«</a></li>
43 {% endif %}
45 {% for page in page_list %}
46 <li>
47 {% if page == "..." %}
48 <span>{{ page }}</span>
49 {% else %}
51 {% if page == entries.number %}
52 <strong>{{ page }}</strong>
53 {% else %}
54 <a href="{% url "directory" category %}?page={{ page }}">{{ page }}</a>
55 {% endif %}
56 {% endif %}
57 </li>
58 {% endfor %}
60 {% if entries.has_next %}
61 <li>
62 <a href="{% url "directory" category %}?page={{ entries.next_page_number }}">»</a>
63 </li>
64 {% endif %}
65 </ul>
66 </div>
68 {% endblock %}