removed some extraneous menus. fixed the 'Send message' link on the moderators page. removed the fancy styling in the subreddit info boxes.

This commit is contained in:
spez
2009-07-31 13:38:30 -07:00
parent 94c17d8ddb
commit a8331fd43a
3 changed files with 18 additions and 29 deletions

View File

@@ -224,15 +224,10 @@ class Reddit(Templated):
if c.user_is_loggedin:
if c.user_is_admin:
more_buttons.append(NamedButton('admin'))
elif c.site.is_moderator(c.user):
more_buttons.append(NavButton(menu.admin, 'about/edit'))
if c.user_is_sponsor:
more_buttons.append(NamedButton('promote'))
if c.user_is_admin:
more_buttons.append(NamedButton('traffic'))
#if there's only one button in the dropdown, get rid of the dropdown
if len(more_buttons) == 1:
main_buttons.append(more_buttons[0])
@@ -371,6 +366,7 @@ class SubredditInfoBar(CachedTemplate):
the current reddit, including links to the moderator and
contributor pages, as well as links to the banning page if the
current user is a moderator."""
def __init__(self, site = None):
site = site or c.site
self.spam = site._spam
@@ -390,6 +386,9 @@ class SubredditInfoBar(CachedTemplate):
self.subscribers = site._ups
self.date = site._date
self.banner = getattr(site, "banner", None)
#so the menus cache properly
self.path = request.path
CachedTemplate.__init__(self)
def nav(self):
@@ -398,12 +397,15 @@ class SubredditInfoBar(CachedTemplate):
buttons.append(NavButton(plurals.contributors, 'contributors'))
if self.is_moderator or self.is_admin:
buttons.append(NamedButton('edit'))
buttons.extend([NavButton(menu.banusers, 'banned'),
NamedButton('reports'),
NamedButton('spam')])
buttons.append(NamedButton('traffic'))
return [NavMenu(buttons, type = "flatlist", base_path = "/about/")]
buttons.extend([
NamedButton('spam'),
NamedButton('reports'),
NavButton(menu.banusers, 'banned'),
NamedButton('traffic'),
NamedButton('edit'),
])
return [NavMenu(buttons, type = "flat_vert", base_path = "/about/",
separator = '')]
class SideBox(CachedTemplate):
"""

View File

@@ -365,22 +365,9 @@ ul.flat-vert {text-align: left;}
.subreddit-info .state-button { display:block }
.subreddit-info .spacer { margin: 10px 0px 0px 0px }
.raisedbox .flat-list { }
.raisedbox .flat-list .separator { display: none; }
.raisedbox .flat-list a {
background-color: #F0F0F0;
border: 1px solid white;
border-bottom: none;
margin-right: 1px;
padding: 3px 5px 3px 5px;
}
.raisedbox .hover a:hover {
background-color: #369;
color: white;
text-decoration: none;
}
.raisedbox .flat-vert { }
.raisedbox .flat-vert .separator { display: none; }
.raisedbox .flat-vert a {font-size: larger;}
/* feature disabled. need to go through this to see what's relevant
before enabling */

View File

@@ -42,7 +42,7 @@
&nbsp;(<b>${thing.user.safe_karma}</b>)
</span>
&nbsp;
%elif c.user_is_loggedin and name == "sendmessage" and c.user != thing.user:
%elif c.user_is_loggedin and thing.name == "sendmessage" and c.user != thing.user:
${plain_link(_("send message"),
"/message/compose?to=%s" % (thing.user.name))}
&nbsp;