Mercurial > public > sg101
view gpp/templates/forums/forum_index.html @ 84:9e5e52556d5b
Forums: added a last_post_info template tag. Still need to add a go to last post icon for it.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 29 Aug 2009 22:01:40 +0000 |
parents | 5b4c812b448e |
children | 531fcc342a03 |
line wrap: on
line source
{% extends 'base.html' %} {% load forum_tags %} {% block title %}Forums: {{ forum.name }}{% endblock %} {% block content %} <h2>Forums: {{ forum.name }}</h2> <h3> <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> » <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> </h3> <div class="forum-block"> <a href="{% url forums-new_topic slug=forum.slug %}">New Post</a> <table class="forum-index-table"> <thead> <tr> <th class="forum-index_title">Topics</th> <th class="forum-index_replies">Replies</th> <th class="forum-index_author">Author</th> <th class="forum-index_views">Views</th> <th class="forum-index_last_post">Last Post</th> </tr> </thead> <tbody> {% for topic in topics %} <tr> <td><h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td> <td class="forum-index_replies">{{ topic.reply_count }}</td> <td class="forum-index_author">{{ topic.user.username }}</td> <td class="forum-index_views">{{ topic.view_count }}</td> <td class="forum-index_last_post"> {% last_post_info topic.last_post %} </td> </tr> {% empty %} <tr> <td colspan="4"> <i>No topics available.</i> </td> </tr> {% endfor %} </tbody> </table> </div> {% endblock %}