# HG changeset patch # User Brian Neal # Date 1252781135 0 # Node ID 515d1daec8116ac6e0dad1a299cbf7472121912f # Parent f81226b5e87b0f6033c2975d6312a70821f932a3 Forums: added intra-page links for posts. Added last_page variable for topic. Conditionally display reply form using last_page. diff -r f81226b5e87b -r 515d1daec811 gpp/forums/views.py --- a/gpp/forums/views.py Sat Sep 05 20:47:08 2009 +0000 +++ b/gpp/forums/views.py Sat Sep 12 18:45:35 2009 +0000 @@ -60,11 +60,13 @@ topic.save() posts = topic.posts.select_related() + last_page = True # TODO return render_to_response('forums/topic.html', { 'forum': topic.forum, 'topic': topic, 'posts': posts, + 'last_page': last_page, 'form': PostForm(), }, context_instance=RequestContext(request)) diff -r f81226b5e87b -r 515d1daec811 gpp/templates/forums/topic.html --- 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 @@
+{% if last_page %} +New Reply • +{% else %} New Reply • +{% endif %} New Topic {% for post in posts %} @@ -33,10 +38,11 @@ {% endfor %}
-{% if user.is_authenticated %} +{% if last_page and user.is_authenticated %} +
-Reply to Thread +Reply to "{{ topic.name }}" {{ form.as_p }}