Mercurial > public > sg101
annotate gpp/templates/forums/topic.html @ 103:bb3f0d315c5f
Forums: added template support for displaying stickied topics.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 17 Sep 2009 00:20:00 +0000 |
parents | e67c4dd98db5 |
children | 59688577a8f1 |
rev | line source |
---|---|
bgneal@86 | 1 {% extends 'base.html' %} |
bgneal@86 | 2 {% block title %}Forums: {{ topic.name }}{% endblock %} |
bgneal@89 | 3 {% block custom_js %}{% if last_page %}{{ form.media }}{% endif %}{% endblock %} |
bgneal@86 | 4 {% block content %} |
bgneal@86 | 5 <h2>Forums: {{ topic.name }}</h2> |
bgneal@86 | 6 |
bgneal@86 | 7 <h3> |
bgneal@86 | 8 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> » |
bgneal@86 | 9 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> » |
bgneal@86 | 10 <a href="{% url forums-topic_index id=topic.id %}">{{ topic.name }}</a> |
bgneal@86 | 11 </h3> |
bgneal@86 | 12 |
bgneal@86 | 13 <div class="forum-block"> |
bgneal@102 | 14 {% if topic.locked %} |
bgneal@102 | 15 <img src="{{ MEDIA_URL }}/icons/lock.png" alt="Lock" title="This topic is locked" /> |
bgneal@102 | 16 {% else %} |
bgneal@87 | 17 {% if last_page %} |
bgneal@102 | 18 <a href="#forum-reply-form">New Reply</a> |
bgneal@87 | 19 {% else %} |
bgneal@102 | 20 <a href="./?page={{ page.paginator.num_pages }}#forum-reply-form">New Reply</a> |
bgneal@87 | 21 {% endif %} |
bgneal@102 | 22 {% endif %} |
bgneal@102 | 23 • <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> |
bgneal@97 | 24 {{ page_nav }} |
bgneal@86 | 25 |
bgneal@89 | 26 <table class="forum-topic" id="forum-topic"> |
bgneal@90 | 27 {% for post in page.object_list %} |
bgneal@89 | 28 {% include 'forums/display_post.html' %} |
bgneal@86 | 29 {% endfor %} |
bgneal@86 | 30 </table> |
bgneal@97 | 31 {{ page_nav }} |
bgneal@90 | 32 |
bgneal@102 | 33 {% if last_page and user.is_authenticated and not topic.locked %} |
bgneal@87 | 34 <a name="forum-reply-form"></a> |
bgneal@89 | 35 <form action="" method="post" id="forums-quick-reply"> |
bgneal@86 | 36 <fieldset> |
bgneal@87 | 37 <legend>Reply to "{{ topic.name }}"</legend> |
bgneal@86 | 38 {{ form.as_p }} |
bgneal@89 | 39 <input type="submit" value="Submit Reply" id="forums-reply-post" /> |
bgneal@86 | 40 </fieldset> |
bgneal@86 | 41 </form> |
bgneal@86 | 42 {% endif %} |
bgneal@86 | 43 </div> |
bgneal@86 | 44 {% endblock %} |