X-Git-Url: http://git.veekun.com/zzz-spline-forum.git/blobdiff_plain/a81670b58f01338129d951f9bd4bfed5862a84aa..3d22d513717cc7d52fc07eeece5cf81fb6ec6ee9:/splinext/forum/templates/forum/lib.mako
diff --git a/splinext/forum/templates/forum/lib.mako b/splinext/forum/templates/forum/lib.mako
index 5be6251..c364c8c 100644
--- a/splinext/forum/templates/forum/lib.mako
+++ b/splinext/forum/templates/forum/lib.mako
@@ -1,6 +1,18 @@
<%namespace name="lib" file="/lib.mako" />
<%namespace name="userlib" file="/users/lib.mako" />
+<%def name="forum_access_level(forum)">
+% if forum.access_level != 'normal':
+
+ % if forum.access_level == 'soapbox':
+
Soapbox: Regular users can't start new threads.
+ % elif forum.access_level == 'archive':
+
Archive: No more posting!
+ % endif
+
+% endif
+%def>
+
<%def name="posts(posts)">
% for post in posts:
@@ -26,7 +38,7 @@
%def>
<%def name="write_thread_form(forum)">
-% if c.user.can('create_forum_thread'):
+% if forum.can_create_thread(c.user):
Create new thread
${h.form(url(controller='forum', action='write_thread', forum_id=forum.id))}
@@ -40,7 +52,7 @@ ${h.end_form()}
%def>
<%def name="write_post_form(thread)">
-% if c.user.can('create_forum_post'):
+% if thread.can_create_post(c.user):
Reply
${h.form(url(controller='forum', action='write', forum_id=thread.forum.id, thread_id=thread.id))}