Mercurial > public > sg101
comparison 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 |
comparison
equal
deleted
inserted
replaced
81:e356ea79a7a2 | 82:bc3978f023c2 |
---|---|
1 {% extends 'base.html' %} | |
2 {% block title %}Forums: {{ forum.name }}{% endblock %} | |
3 {% block content %} | |
4 <h2>Forums: {{ forum.name }}</h2> | |
5 | |
6 <h3> | |
7 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> » | |
8 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> | |
9 </h3> | |
10 | |
11 <div class="forum-block"> | |
12 <table class="forum-index-table"> | |
13 <thead> | |
14 <tr> | |
15 <th class="forum-index_title">Topics</th> | |
16 <th class="forum-index_replies">Replies</th> | |
17 <th class="forum-index_author">Author</th> | |
18 <th class="forum-index_views">Views</th> | |
19 <th class="forum-index_last_post">Last Post</th> | |
20 </tr> | |
21 </thead> | |
22 <tbody> | |
23 {% for topic in topics %} | |
24 <tr> | |
25 <td><h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td> | |
26 <td class="forum-index_replies">{{ topic.post_count }}</td> | |
27 <td class="forum-index_author">{{ topic.user.username }}</td> | |
28 <td class="forum-index_views">{{ topic.view_count }}</td> | |
29 <td class="forum-index_last_post"> | |
30 {% if topic.last_post %} | |
31 {{ topic.last_post.update_date|date }}<br /> | |
32 {{ topic.last_post.user.username }} | |
33 {% else %} | |
34 <i>No Posts</i> | |
35 {% endif %} | |
36 </td> | |
37 </tr> | |
38 {% empty %} | |
39 <tr> | |
40 <td colspan="4"> | |
41 <i>No topics available.</i> | |
42 </td> | |
43 </tr> | |
44 {% endfor %} | |
45 </tbody> | |
46 </table> | |
47 </div> | |
48 {% endblock %} |