Mercurial > public > sg101
annotate gpp/templates/forums/index.html @ 113:d97ceb95ce02
Forums: ForumLastVisit logic in place. Need to add code for topics and posts next.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 11 Oct 2009 19:10:54 +0000 |
parents | 806399f3b950 |
children | f8f4514b806a |
rev | line source |
---|---|
bgneal@81 | 1 {% extends 'base.html' %} |
bgneal@84 | 2 {% load forum_tags %} |
bgneal@81 | 3 {% block title %}Forums{% endblock %} |
bgneal@81 | 4 {% block content %} |
bgneal@81 | 5 <h2>Forums</h2> |
bgneal@81 | 6 |
bgneal@81 | 7 <div class="forum-block"> |
bgneal@81 | 8 {% for iter in cats %} |
bgneal@81 | 9 <h3>{{ iter.cat }}</h3> |
bgneal@81 | 10 <table class="forum-index-table"> |
bgneal@81 | 11 <thead> |
bgneal@81 | 12 <tr> |
bgneal@81 | 13 <th class="forum-title">Forum</th> |
bgneal@81 | 14 <th class="forum-topics">Topics</th> |
bgneal@81 | 15 <th class="forum-posts">Posts</th> |
bgneal@81 | 16 <th class="forum-last_post">Last Post</th> |
bgneal@81 | 17 </tr> |
bgneal@81 | 18 </thead> |
bgneal@81 | 19 <tbody> |
bgneal@81 | 20 {% for forum in iter.forums %} |
bgneal@94 | 21 <tr class="{% cycle 'odd' 'even' %}"> |
bgneal@113 | 22 <td> |
bgneal@113 | 23 {% if forum.has_unread %} |
bgneal@113 | 24 <img src="{{ MEDIA_URL }}icons/new.png" alt="New Posts" title="New Posts" class="forums-topic-icon" /> |
bgneal@113 | 25 {% endif %} |
bgneal@113 | 26 <h4><a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a></h4> |
bgneal@81 | 27 <p>{{ forum.description }}</p></td> |
bgneal@81 | 28 <td class="forum-topics">{{ forum.topic_count }}</td> |
bgneal@81 | 29 <td class="forum-posts">{{ forum.post_count }}</td> |
bgneal@94 | 30 <td class="forum-last_post">{% last_post_info forum.last_post MEDIA_URL %}</td> |
bgneal@81 | 31 </tr> |
bgneal@81 | 32 {% endfor %} |
bgneal@81 | 33 </tbody> |
bgneal@81 | 34 </table> |
bgneal@81 | 35 {% endfor %} |
bgneal@81 | 36 </div> |
bgneal@81 | 37 {% endblock %} |