diff gpp/templates/forums/forum_index.html @ 167:cf9f9d4c4d54

Adding a query to the forums to get all the topics with unread posts. This is for ticket #54.
author Brian Neal <bgneal@gmail.com>
date Sun, 24 Jan 2010 22:33:11 +0000
parents 445e1466a98d
children 6a5549c2efb5
line wrap: on
line diff
--- a/gpp/templates/forums/forum_index.html	Sun Jan 17 20:24:01 2010 +0000
+++ b/gpp/templates/forums/forum_index.html	Sun Jan 24 22:33:11 2010 +0000
@@ -31,21 +31,10 @@
    {% for topic in page.object_list %}
       <tr class="{% cycle 'odd' 'even' %}">
          <td>
-            {% if topic.has_unread %}<img src="{{ MEDIA_URL }}icons/new.png" alt="New Posts" title="New Posts" class="forums-topic-icon" />{% endif %}
-            {% 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 %}
+            {% topic_icons topic %}
             <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>
+               {% topic_page_range topic %}
             {% endif %}
          </td>
          <td class="forum-index_replies">{{ topic.reply_count }}</td>