Mercurial > public > sg101
annotate gpp/templates/forums/topic.html @ 93:4c33e266db03
Forums: paginate the topic list inside a forum.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 13 Sep 2009 04:33:15 +0000 |
parents | 317c7bcaecee |
children | 96eec1ed0fd3 |
rev | line source |
---|---|
bgneal@86 | 1 {% extends 'base.html' %} |
bgneal@90 | 2 {% load forum_tags %} |
bgneal@86 | 3 {% block title %}Forums: {{ topic.name }}{% endblock %} |
bgneal@89 | 4 {% block custom_js %}{% if last_page %}{{ form.media }}{% endif %}{% endblock %} |
bgneal@86 | 5 {% block content %} |
bgneal@86 | 6 <h2>Forums: {{ topic.name }}</h2> |
bgneal@86 | 7 |
bgneal@86 | 8 <h3> |
bgneal@86 | 9 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> » |
bgneal@86 | 10 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> » |
bgneal@86 | 11 <a href="{% url forums-topic_index id=topic.id %}">{{ topic.name }}</a> |
bgneal@86 | 12 </h3> |
bgneal@86 | 13 |
bgneal@86 | 14 <div class="forum-block"> |
bgneal@87 | 15 {% if last_page %} |
bgneal@87 | 16 <a href="#forum-reply-form">New Reply</a> • |
bgneal@87 | 17 {% else %} |
bgneal@90 | 18 <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> • |
bgneal@87 | 19 {% endif %} |
bgneal@86 | 20 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> |
bgneal@93 | 21 {% forum_page_navigation page %} |
bgneal@86 | 22 |
bgneal@89 | 23 <table class="forum-topic" id="forum-topic"> |
bgneal@90 | 24 {% for post in page.object_list %} |
bgneal@89 | 25 {% include 'forums/display_post.html' %} |
bgneal@86 | 26 {% endfor %} |
bgneal@86 | 27 </table> |
bgneal@93 | 28 {% forum_page_navigation page %} |
bgneal@90 | 29 |
bgneal@87 | 30 {% if last_page and user.is_authenticated %} |
bgneal@87 | 31 <a name="forum-reply-form"></a> |
bgneal@89 | 32 <form action="" method="post" id="forums-quick-reply"> |
bgneal@86 | 33 <fieldset> |
bgneal@87 | 34 <legend>Reply to "{{ topic.name }}"</legend> |
bgneal@86 | 35 {{ form.as_p }} |
bgneal@89 | 36 <input type="submit" value="Submit Reply" id="forums-reply-post" /> |
bgneal@86 | 37 </fieldset> |
bgneal@86 | 38 </form> |
bgneal@86 | 39 {% endif %} |
bgneal@86 | 40 </div> |
bgneal@86 | 41 {% endblock %} |