Eagerloading for threads on the front page.
[zzz-spline-forum.git] / splinext / forum / templates / forum / front_page.mako
index ba51503..5e03181 100644 (file)
@@ -8,7 +8,7 @@
         </div>
         <div class="date">${update.post.posted_time}</div>
         <div class="title">
-            <a href="${url(controller='forum', action='posts', forum_id=update.post.thread.forum.id, thread_id=update.post.thread.id)}">
+            <a href="${url(controller='forum', action='posts', forum_id=update.post.thread.forum_id, thread_id=update.post.thread_id)}">
                 ${update.post.thread.subject}
             </a>
         </div>
@@ -18,9 +18,9 @@
             ${userlib.avatar(update.post.author, size=48)}
         </a>
     </div>
-    <div class="content has-comments">${update.post.content}</div>
+    <div class="content has-comments">${update.post.content|n}</div>
     <div class="comments">
-        <a href="${url(controller='forum', action='posts', forum_id=update.post.thread.forum.id, thread_id=update.post.thread.id)}">
+        <a href="${url(controller='forum', action='posts', forum_id=update.post.thread.forum_id, thread_id=update.post.thread.id)}">
             ${update.post.thread.post_count - 1} comment${'' if update.post.thread.post_count == 2 else 's'}
         </a>
     </div>