From: Eevee Date: Sat, 14 Aug 2010 08:04:45 +0000 (-0700) Subject: Show access levels and context everywhere! X-Git-Tag: veekun-promotions/2010082201~4 X-Git-Url: http://git.veekun.com/zzz-spline-forum.git/commitdiff_plain/3d22d513717cc7d52fc07eeece5cf81fb6ec6ee9?hp=0bdf4461e31fce365e9fbc2e0784e634d2431a0e Show access levels and context everywhere! --- diff --git a/splinext/forum/templates/css/forum.mako b/splinext/forum/templates/css/forum.mako index 6af5d50..0a2244b 100644 --- a/splinext/forum/templates/css/forum.mako +++ b/splinext/forum/templates/css/forum.mako @@ -1,4 +1,10 @@ -table.forum-list { width: 100%; } +ul.forum-hierarchy { margin: 0.25em 1em; color: #202020; } +ul.forum-hierarchy li { margin: 0.25em; } + +.forum-access-level { font-size: 0.8em; padding: 0.25em 0.625em; font-style: italic; color: #606060; } +.forum-access-level img { vertical-align: middle; } + +table.forum-list { width: 100%; margin-top: 1em; } table.forum-list .name { text-align: left; } table.forum-list td.name a { display: block; font-size: 1.5em; padding: 0.33em; } table.forum-list .stats { width: 10em; text-align: center; } diff --git a/splinext/forum/templates/forum/forums.mako b/splinext/forum/templates/forum/forums.mako index 21c0289..6aa4be3 100644 --- a/splinext/forum/templates/forum/forums.mako +++ b/splinext/forum/templates/forum/forums.mako @@ -1,4 +1,5 @@ <%inherit file="/base.mako" /> +<%namespace name="forumlib" file="/forum/lib.mako" /> <%def name="title()">Forums @@ -6,7 +7,10 @@ - + @@ -14,7 +18,10 @@ % for forum in c.forums: - + diff --git a/splinext/forum/templates/forum/lib.mako b/splinext/forum/templates/forum/lib.mako index 8a1893d..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 name="posts(posts)">
% for post in posts: diff --git a/splinext/forum/templates/forum/posts.mako b/splinext/forum/templates/forum/posts.mako index 3ba1ec5..a0f83e5 100644 --- a/splinext/forum/templates/forum/posts.mako +++ b/splinext/forum/templates/forum/posts.mako @@ -11,6 +11,17 @@ +

Posts

+ + % if c.thread.post_count == 0:

Something terribly bogus has happened; this thread has no posts.

% else: diff --git a/splinext/forum/templates/forum/threads.mako b/splinext/forum/templates/forum/threads.mako index 8aab297..3eca688 100644 --- a/splinext/forum/templates/forum/threads.mako +++ b/splinext/forum/templates/forum/threads.mako @@ -10,10 +10,21 @@ +

Threads

+ +
Forum + + Forum + Volume Activity
${forum.name} + ${forum.name} + ${forumlib.forum_access_level(forum)} + xxx xxx
- +
Thread + + Thread + Posts