Mercurial > public > sg101
comparison gpp/templates/forums/forum_index.html @ 93:4c33e266db03
Forums: paginate the topic list inside a forum.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 13 Sep 2009 04:33:15 +0000 |
parents | 531fcc342a03 |
children | 806399f3b950 |
comparison
equal
deleted
inserted
replaced
92:62eb9cbbcffc | 93:4c33e266db03 |
---|---|
8 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> » | 8 <a href="{% url forums-index %}">SurfGuitar101 Forum Index</a> » |
9 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> | 9 <a href="{% url forums-forum_index slug=forum.slug %}">{{ forum.name }}</a> |
10 </h3> | 10 </h3> |
11 | 11 |
12 <div class="forum-block"> | 12 <div class="forum-block"> |
13 <a href="{% url forums-new_topic slug=forum.slug %}">New Post</a> | 13 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a> |
14 {% forum_page_navigation page %} | |
14 <table class="forum-index-table"> | 15 <table class="forum-index-table"> |
15 <thead> | 16 <thead> |
16 <tr> | 17 <tr> |
17 <th class="forum-index_title">Topics</th> | 18 <th class="forum-index_title">Topics</th> |
18 <th class="forum-index_replies">Replies</th> | 19 <th class="forum-index_replies">Replies</th> |
20 <th class="forum-index_views">Views</th> | 21 <th class="forum-index_views">Views</th> |
21 <th class="forum-index_last_post">Last Post</th> | 22 <th class="forum-index_last_post">Last Post</th> |
22 </tr> | 23 </tr> |
23 </thead> | 24 </thead> |
24 <tbody> | 25 <tbody> |
25 {% for topic in topics %} | 26 {% for topic in page.object_list %} |
26 <tr> | 27 <tr class="{% cycle 'odd' 'even' %}"> |
27 <td><h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td> | 28 <td><h4><a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a></h4></td> |
28 <td class="forum-index_replies">{{ topic.reply_count }}</td> | 29 <td class="forum-index_replies">{{ topic.reply_count }}</td> |
29 <td class="forum-index_author"><a href="{% url bio-view_profile username=topic.user.username %}" title="View profile for {{ topic.user.username }}">{{ topic.user.username }}</a></td> | 30 <td class="forum-index_author"><a href="{% url bio-view_profile username=topic.user.username %}" title="View profile for {{ topic.user.username }}">{{ topic.user.username }}</a></td> |
30 <td class="forum-index_views">{{ topic.view_count }}</td> | 31 <td class="forum-index_views">{{ topic.view_count }}</td> |
31 <td class="forum-index_last_post"> | 32 <td class="forum-index_last_post"> |
39 </td> | 40 </td> |
40 </tr> | 41 </tr> |
41 {% endfor %} | 42 {% endfor %} |
42 </tbody> | 43 </tbody> |
43 </table> | 44 </table> |
45 {% forum_page_navigation page %} | |
44 </div> | 46 </div> |
45 {% endblock %} | 47 {% endblock %} |