view 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
line wrap: on
line source
{% extends 'base.html' %}
{% load avatar_tags %}
{% block title %}Forums: {{ topic.name }}{% endblock %}
{% block content %}
<h2>Forums: {{ topic.name }}</h2>

<h3>
   <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> &raquo;
   <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> &raquo;
   <a href="{% url forums-topic_index id=topic.id %}">{{ topic.name }}</a>
</h3>

<div class="forum-block">
<a href="">New Reply</a> &bull;
<a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a>

<table class="forum-topic">
{% for post in posts %}
<tr class="forum-post">
   <td class="forum-post-author">
      <a href="{% url bio-view_profile username=post.user.username %}">{{ post.user.username }}</a><br />
      {% avatar post.user %}
   </td>
   <td class="forum-post-body">
      <div class="forum-post-info quiet">
         <a href="{{ post.get_absolute_url }}"><img src="{{ MEDIA_URL }}icons/link.png" alt="Link" title="Link to this post" /></a>
         Posted on {{ post.creation_date|date:"M d, Y H:i" }}
      </div>
      <div class="forum-post-body">
         {{ post.html|safe }}
      </div>
   </td>
</tr>
{% endfor %}
</table>
{% if user.is_authenticated %}
<form action="" method="post">
<fieldset>
<legend>Reply to Thread</legend>
{{ form.as_p }}
<input type="submit" value="Submit Reply" />
</fieldset>
</form>
{% endif %}
</div>
{% endblock %}