diff gpp/templates/forums/forum_index.html @ 102:e67c4dd98db5

Forums: new topic form sprouts boolean fields for sticky and locking if the user has rights. Implemented the locked logic. Fixed a bug where topics where getting out of order (the view_count was bumping the update_date because of auto_now).
author Brian Neal <bgneal@gmail.com>
date Wed, 16 Sep 2009 02:01:57 +0000
parents 96eec1ed0fd3
children bb3f0d315c5f
line wrap: on
line diff
--- a/gpp/templates/forums/forum_index.html	Wed Sep 16 00:39:27 2009 +0000
+++ b/gpp/templates/forums/forum_index.html	Wed Sep 16 02:01:57 2009 +0000
@@ -25,7 +25,9 @@
    <tbody>
    {% for topic in page.object_list %}
       <tr class="{% cycle 'odd' 'even' %}">
-         <td><h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td>
+         <td>{% 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>
          <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>