Skip to content

Commit

Permalink
Show sidebar on /r/mod and multireddit modmail pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
spladug committed Apr 27, 2012
1 parent 8d83903 commit 6ec9f8c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion r2/r2/controllers/listingcontroller.py
Expand Up @@ -638,14 +638,20 @@ def GET_about(self, vuser):
return Reddit(content = Wrapped(vuser)).render()

class MessageController(ListingController):
show_sidebar = False
show_nums = False
render_cls = MessagePage
allow_stylesheets = False
# note: this intentionally replaces the listing-page class which doesn't
# conceptually fit for styling these pages.
extra_page_classes = ['messages-page']

@property
def show_sidebar(self):
if c.default_sr and not isinstance(c.site, (ModSR, MultiReddit)):
return False

return self.where in ("moderator", "multi")

@property
def menus(self):
if c.default_sr and self.where in ('inbox', 'messages', 'comments',
Expand Down

0 comments on commit 6ec9f8c

Please sign in to comment.