annotate gpp/templates/forums/index.html @ 368:b76af55aafe4

For #176; cache the output of the latest poll block template tag.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 Mar 2011 21:00:00 +0000
parents 88b2b9cb8c1f
children dd673fae508d
rev   line source
bgneal@81 1 {% extends 'base.html' %}
bgneal@164 2 {% load cache %}
bgneal@84 3 {% load forum_tags %}
bgneal@227 4 {% load core_tags %}
bgneal@170 5 {% block custom_head %}
bgneal@170 6 {% for feed in feeds %}
bgneal@170 7 <link rel="alternate" type="application/rss+xml" title="{{ feed.name }}" href="{{ feed.feed }}" />
bgneal@170 8 {% endfor %}
bgneal@280 9 {% include "forums/forum_query.js" %}
bgneal@170 10 {% endblock %}
bgneal@81 11 {% block title %}Forums{% endblock %}
bgneal@81 12 {% block content %}
bgneal@312 13 <h2>Forums <a href="/feeds/forums/"><img src="{{ STATIC_URL }}icons/feed.png" alt="Forums Feed" title="Forums Feed" /></a></h2>
bgneal@81 14
bgneal@280 15 {% include "forums/forum_query.html" %}
bgneal@167 16
bgneal@81 17 <div class="forum-block">
bgneal@81 18 {% for iter in cats %}
bgneal@81 19 <h3>{{ iter.cat }}</h3>
bgneal@81 20 <table class="forum-index-table">
bgneal@81 21 <thead>
bgneal@81 22 <tr>
bgneal@81 23 <th class="forum-title">Forum</th>
bgneal@81 24 <th class="forum-topics">Topics</th>
bgneal@81 25 <th class="forum-posts">Posts</th>
bgneal@81 26 <th class="forum-last_post">Last Post</th>
bgneal@81 27 </tr>
bgneal@81 28 </thead>
bgneal@81 29 <tbody>
bgneal@81 30 {% for forum in iter.forums %}
bgneal@94 31 <tr class="{% cycle 'odd' 'even' %}">
bgneal@113 32 <td>
bgneal@113 33 {% if forum.has_unread %}
bgneal@312 34 <img src="{{ STATIC_URL }}icons/new.png" alt="New Posts" title="New Posts" class="forums-topic-icon" />
bgneal@113 35 {% endif %}
bgneal@263 36 <h4><a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a></h4>
bgneal@263 37 <p>{{ forum.description }}</p>
bgneal@263 38 </td>
bgneal@81 39 <td class="forum-topics">{{ forum.topic_count }}</td>
bgneal@81 40 <td class="forum-posts">{{ forum.post_count }}</td>
bgneal@120 41 <td class="forum-last_post">{% last_post_info forum.last_post %}</td>
bgneal@81 42 </tr>
bgneal@81 43 {% endfor %}
bgneal@81 44 </tbody>
bgneal@81 45 </table>
bgneal@81 46 {% endfor %}
bgneal@164 47 {% cache 900 forum-stats-block %}
bgneal@164 48 {% forum_stats %}
bgneal@164 49 {% endcache %}
bgneal@160 50 {% whos_online %}
bgneal@120 51 <p>{% current_forum_time user %}</p>
bgneal@81 52 </div>
bgneal@81 53 {% endblock %}