diff gpp/templates/forums/forum_index.html @ 161:445e1466a98d

Implement #47; add goto page links on topics in the forum index view.
author Brian Neal <bgneal@gmail.com>
date Tue, 22 Dec 2009 03:31:43 +0000
parents f8f4514b806a
children cf9f9d4c4d54
line wrap: on
line diff
--- a/gpp/templates/forums/forum_index.html	Tue Dec 22 02:08:05 2009 +0000
+++ b/gpp/templates/forums/forum_index.html	Tue Dec 22 03:31:43 2009 +0000
@@ -35,7 +35,19 @@
             {% if topic.sticky %}<img src="{{ MEDIA_URL }}icons/asterisk_orange.png" alt="Sticky" title="Sticky" class="forums-topic-icon" />{% endif %}
             {% if topic.locked %}<img src="{{ MEDIA_URL }}icons/lock.png" alt="Locked" title="Locked"
             class="forums-topic-icon" />{% endif %}
-         <h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td>
+            <h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4>
+            {% if topic.page_range %}
+            <span class="small">Goto page: [
+            {% for n in topic.page_range %}
+               {% if n %}
+               <a href="{{ topic.get_absolute_url }}?page={{ n }}">{{ n }}</a>
+               {% else %}
+               &hellip;
+               {% endif %}
+            {% endfor %}
+            ]</span>
+            {% endif %}
+         </td>
          <td class="forum-index_replies">{{ topic.reply_count }}</td>
          <td class="forum-index_author"><a href="{% url bio-view_profile username=topic.user.username %}" title="View profile for {{ topic.user.username }}">{{ topic.user.username }}</a></td>
          <td class="forum-index_views">{{ topic.view_count }}</td>