comparison gpp/templates/forums/topic_list.html @ 167:cf9f9d4c4d54

Adding a query to the forums to get all the topics with unread posts. This is for ticket #54.
author Brian Neal <bgneal@gmail.com>
date Sun, 24 Jan 2010 22:33:11 +0000
parents
children 21d2ca3b4bf7
comparison
equal deleted inserted replaced
166:8acf5be27f18 167:cf9f9d4c4d54
1 {% extends 'base.html' %}
2 {% load forum_tags %}
3 {% block title %}Forums: {{ title }}{% endblock %}
4 {% block content %}
5 <h2>Forums: {{ title }}</h2>
6 <h3>
7 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> &raquo; {{ title }}
8 </h3>
9 <div class="forum-block">
10 {{ page_nav }}
11 <table class="forum-topic-table">
12 <thead>
13 <th class="col-0">Forum</th>
14 <th class="col-1">Topic</th>
15 <th class="col-2">Author</th>
16 <th class="col-3">Replies</th>
17 <th class="col-4">Views</th>
18 <th class="col-5">Last Post</th>
19 </thead>
20 <tbody>
21 {% for topic in page.object_list %}
22 <tr class="{% cycle 'odd' 'even' %}">
23 <td class="col-0">
24 <h4><a href="{{ topic.forum.get_absolute_url }}">{{ topic.forum.name }}</a></h4>
25 </td>
26 <td class="col-1">
27 {% topic_icons topic %}
28 <h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4>
29 {% if topic.page_range %}
30 {% topic_page_range topic %}
31 {% endif %}
32 </td>
33 <td class="col-2">
34 <a href="{% url bio-view_profile username=topic.user.username %}" title="View profile for {{ topic.user.username }}">{{ topic.user.username }}</a>
35 </td>
36 <td class="col-3">
37 {{ topic.reply_count }}
38 </td>
39 <td class="col-4">
40 {{ topic.view_count }}
41 </td>
42 <td class="col-5">
43 {% last_post_info topic.last_post %}
44 </td>
45 </tr>
46 {% empty %}
47 <tr>
48 <td colspan="6" class="info">
49 <em>No topics meet your search criteria.</em>
50 </td>
51 </tr>
52 {% endfor %}
53 </tbody>
54 </table>
55 {{ page_nav }}
56 </div>
57 {% endblock %}