Mercurial > public > sg101
diff gpp/templates/forums/topic.html @ 87:515d1daec811
Forums: added intra-page links for posts. Added last_page variable for topic. Conditionally display reply form using last_page.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 12 Sep 2009 18:45:35 +0000 |
parents | f81226b5e87b |
children | 021492db4aad |
line wrap: on
line diff
--- a/gpp/templates/forums/topic.html Sat Sep 05 20:47:08 2009 +0000 +++ b/gpp/templates/forums/topic.html Sat Sep 12 18:45:35 2009 +0000 @@ -11,13 +11,18 @@ </h3> <div class="forum-block"> +{% if last_page %} +<a href="#forum-reply-form">New Reply</a> • +{% else %} <a href="">New Reply</a> • +{% endif %} <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 name="p{{ post.id }}"></a> <a href="{% url bio-view_profile username=post.user.username %}">{{ post.user.username }}</a><br /> {% avatar post.user %} </td> @@ -33,10 +38,11 @@ </tr> {% endfor %} </table> -{% if user.is_authenticated %} +{% if last_page and user.is_authenticated %} +<a name="forum-reply-form"></a> <form action="" method="post"> <fieldset> -<legend>Reply to Thread</legend> +<legend>Reply to "{{ topic.name }}"</legend> {{ form.as_p }} <input type="submit" value="Submit Reply" /> </fieldset>