Mercurial > public > sg101
annotate gpp/templates/forums/topic.html @ 89:021492db4aad
Forums: Got the reply function working.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 12 Sep 2009 21:29:31 +0000 |
parents | 515d1daec811 |
children | 317c7bcaecee |
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@87 | 14 {% if last_page %} |
bgneal@87 | 15 <a href="#forum-reply-form">New Reply</a> • |
bgneal@87 | 16 {% else %} |
bgneal@86 | 17 <a href="">New Reply</a> • |
bgneal@87 | 18 {% endif %} |
bgneal@86 | 19 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> |
bgneal@86 | 20 |
bgneal@89 | 21 <table class="forum-topic" id="forum-topic"> |
bgneal@86 | 22 {% for post in posts %} |
bgneal@89 | 23 {% include 'forums/display_post.html' %} |
bgneal@86 | 24 {% endfor %} |
bgneal@86 | 25 </table> |
bgneal@87 | 26 {% if last_page and user.is_authenticated %} |
bgneal@87 | 27 <a name="forum-reply-form"></a> |
bgneal@89 | 28 <form action="" method="post" id="forums-quick-reply"> |
bgneal@86 | 29 <fieldset> |
bgneal@87 | 30 <legend>Reply to "{{ topic.name }}"</legend> |
bgneal@86 | 31 {{ form.as_p }} |
bgneal@89 | 32 <input type="submit" value="Submit Reply" id="forums-reply-post" /> |
bgneal@86 | 33 </fieldset> |
bgneal@86 | 34 </form> |
bgneal@86 | 35 {% endif %} |
bgneal@86 | 36 </div> |
bgneal@86 | 37 {% endblock %} |