Mercurial > public > sg101
annotate gpp/templates/forums/topic.html @ 86:f81226b5e87b
Forums: Some display work for the posts within a topic. Sketched out a post reply form.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 20:47:08 +0000 |
parents | |
children | 515d1daec811 |
rev | line source |
---|---|
bgneal@86 | 1 {% extends 'base.html' %} |
bgneal@86 | 2 {% load avatar_tags %} |
bgneal@86 | 3 {% block title %}Forums: {{ topic.name }}{% 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@86 | 14 <a href="">New Reply</a> • |
bgneal@86 | 15 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> |
bgneal@86 | 16 |
bgneal@86 | 17 <table class="forum-topic"> |
bgneal@86 | 18 {% for post in posts %} |
bgneal@86 | 19 <tr class="forum-post"> |
bgneal@86 | 20 <td class="forum-post-author"> |
bgneal@86 | 21 <a href="{% url bio-view_profile username=post.user.username %}">{{ post.user.username }}</a><br /> |
bgneal@86 | 22 {% avatar post.user %} |
bgneal@86 | 23 </td> |
bgneal@86 | 24 <td class="forum-post-body"> |
bgneal@86 | 25 <div class="forum-post-info quiet"> |
bgneal@86 | 26 <a href="{{ post.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Link" title="Link to this post" /></a> |
bgneal@86 | 27 Posted on {{ post.creation_date|date:"M d, Y H:i" }} |
bgneal@86 | 28 </div> |
bgneal@86 | 29 <div class="forum-post-body"> |
bgneal@86 | 30 {{ post.html|safe }} |
bgneal@86 | 31 </div> |
bgneal@86 | 32 </td> |
bgneal@86 | 33 </tr> |
bgneal@86 | 34 {% endfor %} |
bgneal@86 | 35 </table> |
bgneal@86 | 36 {% if user.is_authenticated %} |
bgneal@86 | 37 <form action="" method="post"> |
bgneal@86 | 38 <fieldset> |
bgneal@86 | 39 <legend>Reply to Thread</legend> |
bgneal@86 | 40 {{ form.as_p }} |
bgneal@86 | 41 <input type="submit" value="Submit Reply" /> |
bgneal@86 | 42 </fieldset> |
bgneal@86 | 43 </form> |
bgneal@86 | 44 {% endif %} |
bgneal@86 | 45 </div> |
bgneal@86 | 46 {% endblock %} |