Paging for threads and posts! #314
[zzz-spline-forum.git] / splinext / forum / templates / forum / posts.mako
1 <%inherit file="/base.mako" />
2 <%namespace name="forumlib" file="/forum/lib.mako" />
3 <%namespace name="lib" file="/lib.mako" />
4
5 <%def name="title()">${c.thread.subject} - Forums</%def>
6
7 <%def name="title_in_page()">
8 <ul id="breadcrumbs">
9     <li><a href="${url(controller='forum', action='forums')}">Forums</a></li>
10     <li><a href="${url(controller='forum', action='threads', forum_id=c.thread.forum.id)}">${c.thread.forum.name}</a></li>
11     <li>${c.thread.subject}</li>
12 </ul>
13 </%def>
14
15 <h1>Posts</h1>
16 ${forumlib.hierarchy(c.thread.forum, c.thread)}
17
18 % if c.thread.post_count == 0:
19 <p>Something terribly bogus has happened; this thread has no posts.</p>
20 % else:
21 ${lib.pager(c.skip, c.per_page, c.thread.post_count, dict(controller='forum', action='posts', forum_id=c.thread.forum_id, thread_id=c.thread.id))}
22 ${forumlib.posts(c.posts)}
23 ${lib.pager(c.skip, c.per_page, c.thread.post_count, dict(controller='forum', action='posts', forum_id=c.thread.forum_id, thread_id=c.thread.id))}
24 % endif
25
26 ${forumlib.write_post_form(c.thread)}