annotate 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
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> &raquo;
bgneal@86 10 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> &raquo;
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> &bull;
bgneal@87 17 {% else %}
bgneal@90 18 <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> &bull;
bgneal@87 19 {% endif %}
bgneal@86 20 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a>
bgneal@90 21 {% post_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@90 28 {% post_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 &quot;{{ topic.name }}&quot;</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 %}