diff gpp/templates/forums/topic_list.html @ 374:dd673fae508d

Fixing #156. Making it possible to goto the first unread post in a thread. Made the 'New' icon a link; when displayed on a topic, takes you to the first unread post.
author Brian Neal <bgneal@gmail.com>
date Mon, 07 Mar 2011 01:22:49 +0000
parents daa2916f5b34
children 957955279a15
line wrap: on
line diff
--- a/gpp/templates/forums/topic_list.html	Sun Mar 06 21:50:10 2011 +0000
+++ b/gpp/templates/forums/topic_list.html	Mon Mar 07 01:22:49 2011 +0000
@@ -27,7 +27,7 @@
          </td>
          <td class="col-1">
             {% topic_icons topic %}
-            <h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4>
+            <h4>{% if unread %}<a href="{% url 'forums-topic_unread' id=topic.id %}">{% else %}<a href="{{ topic.get_absolute_url }}">{% endif %}{{ topic.name }}</a></h4>
             {% if topic.page_range %}
                {% topic_page_range topic %}
             {% endif %}