Show access levels and context everywhere!
[zzz-spline-forum.git] / splinext / forum / templates / forum / posts.mako
index 24dd875..a0f83e5 100644 (file)
@@ -1,4 +1,5 @@
 <%inherit file="/base.mako" />
+<%namespace name="forumlib" file="/forum/lib.mako" />
 
 <%def name="title()">${c.thread.subject} - Forums</%def>
 
 </ul>
 </%def>
 
+<h1>Posts</h1>
+<ul class="forum-hierarchy">
+    <li>
+        In forum: <a href="${url(controller='forum', action='threads', forum_id=c.thread.forum.id)}"><img src="${h.static_uri('spline', 'icons/folders-stack.png')}" alt=""> ${c.thread.forum.name}</a>
+        ${forumlib.forum_access_level(c.thread.forum)}
+    </li>
+    <li>
+        In thread: <strong><img src="${h.static_uri('spline', 'icons/folder-open-document-text.png')}" alt=""> ${c.thread.subject}</strong>
+    </li>
+</ul>
+
 % if c.thread.post_count == 0:
 <p>Something terribly bogus has happened; this thread has no posts.</p>
-<% return %>
+% else:
+${forumlib.posts(c.thread.posts)}
 % endif
 
-<div class="forum-post-container">
-    % for post in c.thread.posts:
-    <div class="forum-post">
-        <div class="author">
-            ${post.author.name}
-        </div>
-        <div class="meta">
-            <time>${post.posted_time}</time>
-        </div>
-        <div class="content">${post.content}</div>
-    </div>
-    % endfor
-</div>
+${forumlib.write_post_form(c.thread)}