<%inherit file="/base.mako" />
<%namespace name="forumlib" file="/forum/lib.mako" />
+<%namespace name="userlib" file="/users/lib.mako" />
<%def name="title()">${c.forum.name} - Forums</%def>
</%def>
<h1>Threads</h1>
-<ul class="forum-hierarchy">
- <li>
- In forum: <strong><img src="${h.static_uri('spline', 'icons/folders-stack.png')}" alt=""> ${c.forum.name}</strong>
- ${forumlib.forum_access_level(c.forum)}
- </li>
-</ul>
+${forumlib.hierarchy(c.forum)}
<table class="forum-list striped-rows">
<thead>
<img src="${h.static_uri('spline', 'icons/folder-open-document-text.png')}" alt="">
Thread
</th>
+ <th class="stats">Last post</th>
<th class="stats">Posts</th>
</tr>
</thead>
% for thread in c.threads:
<tr>
<td class="name"><a href="${url(controller='forum', action='posts', forum_id=c.forum.id, thread_id=thread.id)}">${thread.subject}</a></td>
+ <td class="last-post">
+ % if thread.last_post:
+ ## XXX should do direct post link
+ <a href="${url(controller='forum', action='posts', forum_id=c.forum.id, thread_id=thread.last_post.thread_id)}">${thread.last_post.posted_time}</a>
+ <br> by <a href="${url(controller='users', action='profile', id=thread.last_post.author.id, name=thread.last_post.author.name)}">${userlib.color_bar(thread.last_post.author)} ${thread.last_post.author.name}</a>
+ % else:
+ —
+ % endif
+ </td>
<td class="stats">${thread.post_count}</td>
</tr>
% endfor