comparison 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
comparison
equal deleted inserted replaced
85:531fcc342a03 86:f81226b5e87b
1 {% extends 'base.html' %}
2 {% load avatar_tags %}
3 {% block title %}Forums: {{ topic.name }}{% endblock %}
4 {% block content %}
5 <h2>Forums: {{ topic.name }}</h2>
6
7 <h3>
8 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> &raquo;
9 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> &raquo;
10 <a href="{% url forums-topic_index id=topic.id %}">{{ topic.name }}</a>
11 </h3>
12
13 <div class="forum-block">
14 <a href="">New Reply</a> &bull;
15 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a>
16
17 <table class="forum-topic">
18 {% for post in posts %}
19 <tr class="forum-post">
20 <td class="forum-post-author">
21 <a href="{% url bio-view_profile username=post.user.username %}">{{ post.user.username }}</a><br />
22 {% avatar post.user %}
23 </td>
24 <td class="forum-post-body">
25 <div class="forum-post-info quiet">
26 <a href="{{ post.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Link" title="Link to this post" /></a>
27 Posted on {{ post.creation_date|date:"M d, Y H:i" }}
28 </div>
29 <div class="forum-post-body">
30 {{ post.html|safe }}
31 </div>
32 </td>
33 </tr>
34 {% endfor %}
35 </table>
36 {% if user.is_authenticated %}
37 <form action="" method="post">
38 <fieldset>
39 <legend>Reply to Thread</legend>
40 {{ form.as_p }}
41 <input type="submit" value="Submit Reply" />
42 </fieldset>
43 </form>
44 {% endif %}
45 </div>
46 {% endblock %}