Mercurial > public > sg101
annotate gpp/templates/forums/index.html @ 166:8acf5be27f18
Implement #50, add a template tag to display the latest poll and add to the home page.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 17 Jan 2010 20:24:01 +0000 |
parents | f7a6b8fe4556 |
children | cf9f9d4c4d54 |
rev | line source |
---|---|
bgneal@81 | 1 {% extends 'base.html' %} |
bgneal@164 | 2 {% load cache %} |
bgneal@84 | 3 {% load forum_tags %} |
bgneal@81 | 4 {% block title %}Forums{% endblock %} |
bgneal@81 | 5 {% block content %} |
bgneal@81 | 6 <h2>Forums</h2> |
bgneal@81 | 7 |
bgneal@81 | 8 <div class="forum-block"> |
bgneal@81 | 9 {% for iter in cats %} |
bgneal@81 | 10 <h3>{{ iter.cat }}</h3> |
bgneal@81 | 11 <table class="forum-index-table"> |
bgneal@81 | 12 <thead> |
bgneal@81 | 13 <tr> |
bgneal@81 | 14 <th class="forum-title">Forum</th> |
bgneal@81 | 15 <th class="forum-topics">Topics</th> |
bgneal@81 | 16 <th class="forum-posts">Posts</th> |
bgneal@81 | 17 <th class="forum-last_post">Last Post</th> |
bgneal@81 | 18 </tr> |
bgneal@81 | 19 </thead> |
bgneal@81 | 20 <tbody> |
bgneal@81 | 21 {% for forum in iter.forums %} |
bgneal@94 | 22 <tr class="{% cycle 'odd' 'even' %}"> |
bgneal@113 | 23 <td> |
bgneal@113 | 24 {% if forum.has_unread %} |
bgneal@113 | 25 <img src="{{ MEDIA_URL }}icons/new.png" alt="New Posts" title="New Posts" class="forums-topic-icon" /> |
bgneal@113 | 26 {% endif %} |
bgneal@113 | 27 <h4><a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a></h4> |
bgneal@81 | 28 <p>{{ forum.description }}</p></td> |
bgneal@81 | 29 <td class="forum-topics">{{ forum.topic_count }}</td> |
bgneal@81 | 30 <td class="forum-posts">{{ forum.post_count }}</td> |
bgneal@120 | 31 <td class="forum-last_post">{% last_post_info forum.last_post %}</td> |
bgneal@81 | 32 </tr> |
bgneal@81 | 33 {% endfor %} |
bgneal@81 | 34 </tbody> |
bgneal@81 | 35 </table> |
bgneal@81 | 36 {% endfor %} |
bgneal@164 | 37 {% cache 900 forum-stats-block %} |
bgneal@164 | 38 {% forum_stats %} |
bgneal@164 | 39 {% endcache %} |
bgneal@160 | 40 {% whos_online %} |
bgneal@120 | 41 <p>{% current_forum_time user %}</p> |
bgneal@81 | 42 </div> |
bgneal@81 | 43 {% endblock %} |