annotate gpp/templates/forums/index.html @ 197:2baadae33f2e

Got autocomplete working for the member search. Updated django and ran into a bug where url tags with comma separated kwargs starting consuming tons of CPU throughput. The work-around is to cut over to using spaces between arguments. This is now allowed to be consistent with other tags. Did some query optimization for the news app.
author Brian Neal <bgneal@gmail.com>
date Sat, 10 Apr 2010 04:32:24 +0000
parents 6f14970b103a
children 423c39ee44e0
rev   line source
bgneal@81 1 {% extends 'base.html' %}
bgneal@164 2 {% load cache %}
bgneal@84 3 {% load forum_tags %}
bgneal@170 4 {% block custom_head %}
bgneal@170 5 {% for feed in feeds %}
bgneal@170 6 <link rel="alternate" type="application/rss+xml" title="{{ feed.name }}" href="{{ feed.feed }}" />
bgneal@170 7 {% endfor %}
bgneal@170 8 {% endblock %}
bgneal@81 9 {% block title %}Forums{% endblock %}
bgneal@81 10 {% block content %}
bgneal@170 11 <h2>Forums <a href="/feeds/forums/"><img src="{{ MEDIA_URL }}icons/feed.png" alt="Forums Feed" title="Forums Feed" /></a></h2>
bgneal@81 12
bgneal@167 13 <form action="." method="get" id="forum-query-form">
bgneal@167 14 <select name="query">
bgneal@167 15 <option value="unread">Show topics with unread posts</option>
bgneal@167 16 <option value="mine">Show my posts</option>
bgneal@167 17 <option value="unanswered">Show unanswered posts</option>
bgneal@167 18 </select><input type="submit" value="Go" />
bgneal@167 19 </form>
bgneal@167 20
bgneal@81 21 <div class="forum-block">
bgneal@81 22 {% for iter in cats %}
bgneal@81 23 <h3>{{ iter.cat }}</h3>
bgneal@81 24 <table class="forum-index-table">
bgneal@81 25 <thead>
bgneal@81 26 <tr>
bgneal@81 27 <th class="forum-title">Forum</th>
bgneal@81 28 <th class="forum-topics">Topics</th>
bgneal@81 29 <th class="forum-posts">Posts</th>
bgneal@81 30 <th class="forum-last_post">Last Post</th>
bgneal@81 31 </tr>
bgneal@81 32 </thead>
bgneal@81 33 <tbody>
bgneal@81 34 {% for forum in iter.forums %}
bgneal@94 35 <tr class="{% cycle 'odd' 'even' %}">
bgneal@113 36 <td>
bgneal@113 37 {% if forum.has_unread %}
bgneal@113 38 <img src="{{ MEDIA_URL }}icons/new.png" alt="New Posts" title="New Posts" class="forums-topic-icon" />
bgneal@113 39 {% endif %}
bgneal@170 40 <h4><a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a>
bgneal@170 41 {% if forum.has_feed %}
bgneal@170 42 <a href="/feeds/forums/{{ forum.slug }}">
bgneal@170 43 <img src="{{ MEDIA_URL }}icons/feed.png" alt="RSS Feed" title="Feed for this forum" /></a>
bgneal@170 44 {% endif %}</h4>
bgneal@81 45 <p>{{ forum.description }}</p></td>
bgneal@81 46 <td class="forum-topics">{{ forum.topic_count }}</td>
bgneal@81 47 <td class="forum-posts">{{ forum.post_count }}</td>
bgneal@120 48 <td class="forum-last_post">{% last_post_info forum.last_post %}</td>
bgneal@81 49 </tr>
bgneal@81 50 {% endfor %}
bgneal@81 51 </tbody>
bgneal@81 52 </table>
bgneal@81 53 {% endfor %}
bgneal@164 54 {% cache 900 forum-stats-block %}
bgneal@164 55 {% forum_stats %}
bgneal@164 56 {% endcache %}
bgneal@160 57 {% whos_online %}
bgneal@120 58 <p>{% current_forum_time user %}</p>
bgneal@81 59 </div>
bgneal@81 60 {% endblock %}