comparison gpp/templates/forums/forum_index.html @ 97:96eec1ed0fd3

Render the forum page navigation in the view with render_to_string() to avoid doing it twice in the template code. Also undo a mistake in the last commit. Need 2 different orderings for Post objects: by creation date in normal views, and by reverse creation date in the admin.
author Brian Neal <bgneal@gmail.com>
date Sun, 13 Sep 2009 19:58:31 +0000
parents 806399f3b950
children e67c4dd98db5
comparison
equal deleted inserted replaced
96:93d9e74a471e 97:96eec1ed0fd3
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 Topic</a> 13 <a href="{% url forums-new_topic slug=forum.slug %}">New Topic</a>
14 {% forum_page_navigation page %} 14 {{ page_nav }}
15 <table class="forum-index-table"> 15 <table class="forum-index-table">
16 <thead> 16 <thead>
17 <tr> 17 <tr>
18 <th class="forum-index_title">Topics</th> 18 <th class="forum-index_title">Topics</th>
19 <th class="forum-index_replies">Replies</th> 19 <th class="forum-index_replies">Replies</th>
40 </td> 40 </td>
41 </tr> 41 </tr>
42 {% endfor %} 42 {% endfor %}
43 </tbody> 43 </tbody>
44 </table> 44 </table>
45 {% forum_page_navigation page %} 45 {{ page_nav }}
46 </div> 46 </div>
47 {% endblock %} 47 {% endblock %}