annotate gpp/templates/forums/index.html @ 170:6f14970b103a

Implement #52 Forums RSS feeds.
author Brian Neal <bgneal@gmail.com>
date Thu, 11 Feb 2010 02:29:03 +0000
parents cf9f9d4c4d54
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 %}