Mercurial > public > sg101
annotate gpp/templates/forums/forum_index.html @ 82:bc3978f023c2
Forums: started the ability to display topics inside a forum.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 23 Aug 2009 04:04:29 +0000 |
parents | |
children | 5b4c812b448e |
rev | line source |
---|---|
bgneal@82 | 1 {% extends 'base.html' %} |
bgneal@82 | 2 {% block title %}Forums: {{ forum.name }}{% endblock %} |
bgneal@82 | 3 {% block content %} |
bgneal@82 | 4 <h2>Forums: {{ forum.name }}</h2> |
bgneal@82 | 5 |
bgneal@82 | 6 <h3> |
bgneal@82 | 7 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> » |
bgneal@82 | 8 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> |
bgneal@82 | 9 </h3> |
bgneal@82 | 10 |
bgneal@82 | 11 <div class="forum-block"> |
bgneal@82 | 12 <table class="forum-index-table"> |
bgneal@82 | 13 <thead> |
bgneal@82 | 14 <tr> |
bgneal@82 | 15 <th class="forum-index_title">Topics</th> |
bgneal@82 | 16 <th class="forum-index_replies">Replies</th> |
bgneal@82 | 17 <th class="forum-index_author">Author</th> |
bgneal@82 | 18 <th class="forum-index_views">Views</th> |
bgneal@82 | 19 <th class="forum-index_last_post">Last Post</th> |
bgneal@82 | 20 </tr> |
bgneal@82 | 21 </thead> |
bgneal@82 | 22 <tbody> |
bgneal@82 | 23 {% for topic in topics %} |
bgneal@82 | 24 <tr> |
bgneal@82 | 25 <td><h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td> |
bgneal@82 | 26 <td class="forum-index_replies">{{ topic.post_count }}</td> |
bgneal@82 | 27 <td class="forum-index_author">{{ topic.user.username }}</td> |
bgneal@82 | 28 <td class="forum-index_views">{{ topic.view_count }}</td> |
bgneal@82 | 29 <td class="forum-index_last_post"> |
bgneal@82 | 30 {% if topic.last_post %} |
bgneal@82 | 31 {{ topic.last_post.update_date|date }}<br /> |
bgneal@82 | 32 {{ topic.last_post.user.username }} |
bgneal@82 | 33 {% else %} |
bgneal@82 | 34 <i>No Posts</i> |
bgneal@82 | 35 {% endif %} |
bgneal@82 | 36 </td> |
bgneal@82 | 37 </tr> |
bgneal@82 | 38 {% empty %} |
bgneal@82 | 39 <tr> |
bgneal@82 | 40 <td colspan="4"> |
bgneal@82 | 41 <i>No topics available.</i> |
bgneal@82 | 42 </td> |
bgneal@82 | 43 </tr> |
bgneal@82 | 44 {% endfor %} |
bgneal@82 | 45 </tbody> |
bgneal@82 | 46 </table> |
bgneal@82 | 47 </div> |
bgneal@82 | 48 {% endblock %} |