Mercurial > public > sg101
comparison gpp/templates/forums/topic.html @ 90:317c7bcaecee
Forums: pagination for topics.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 13 Sep 2009 00:21:54 +0000 |
parents | 021492db4aad |
children | 4c33e266db03 |
comparison
equal
deleted
inserted
replaced
89:021492db4aad | 90:317c7bcaecee |
---|---|
1 {% extends 'base.html' %} | 1 {% extends 'base.html' %} |
2 {% load forum_tags %} | |
2 {% block title %}Forums: {{ topic.name }}{% endblock %} | 3 {% block title %}Forums: {{ topic.name }}{% endblock %} |
3 {% block custom_js %}{% if last_page %}{{ form.media }}{% endif %}{% endblock %} | 4 {% block custom_js %}{% if last_page %}{{ form.media }}{% endif %}{% endblock %} |
4 {% block content %} | 5 {% block content %} |
5 <h2>Forums: {{ topic.name }}</h2> | 6 <h2>Forums: {{ topic.name }}</h2> |
6 | 7 |
12 | 13 |
13 <div class="forum-block"> | 14 <div class="forum-block"> |
14 {% if last_page %} | 15 {% if last_page %} |
15 <a href="#forum-reply-form">New Reply</a> • | 16 <a href="#forum-reply-form">New Reply</a> • |
16 {% else %} | 17 {% else %} |
17 <a href="">New Reply</a> • | 18 <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> • |
18 {% endif %} | 19 {% endif %} |
19 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> | 20 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> |
21 {% post_navigation page %} | |
20 | 22 |
21 <table class="forum-topic" id="forum-topic"> | 23 <table class="forum-topic" id="forum-topic"> |
22 {% for post in posts %} | 24 {% for post in page.object_list %} |
23 {% include 'forums/display_post.html' %} | 25 {% include 'forums/display_post.html' %} |
24 {% endfor %} | 26 {% endfor %} |
25 </table> | 27 </table> |
28 {% post_navigation page %} | |
29 | |
26 {% if last_page and user.is_authenticated %} | 30 {% if last_page and user.is_authenticated %} |
27 <a name="forum-reply-form"></a> | 31 <a name="forum-reply-form"></a> |
28 <form action="" method="post" id="forums-quick-reply"> | 32 <form action="" method="post" id="forums-quick-reply"> |
29 <fieldset> | 33 <fieldset> |
30 <legend>Reply to "{{ topic.name }}"</legend> | 34 <legend>Reply to "{{ topic.name }}"</legend> |