Add body classes to all remaining subreddit pages

This commit is contained in:
Chad Birch
2013-02-22 18:21:15 -07:00
parent c28061e1e4
commit a129a81f34
2 changed files with 7 additions and 0 deletions

View File

@@ -752,6 +752,7 @@ class FrontController(RedditController, OAuth2ResourceController):
count=count)[2]
return LinkInfoPage(link=article, content=pane,
page_classes=['related-page'],
subtitle=_('related')).render()
@base_listing
@@ -771,6 +772,7 @@ class FrontController(RedditController, OAuth2ResourceController):
comment = None,
duplicates = links,
content = listing,
page_classes=['other-discussions-page'],
subtitle = _('other discussions')).render()
return res

View File

@@ -221,6 +221,7 @@ class FixListing(object):
class HotController(FixListing, ListingController):
where = 'hot'
extra_page_classes = ['hot-page']
def spotlight(self):
campaigns_by_link = {}
@@ -397,6 +398,7 @@ class HotController(FixListing, ListingController):
class NewController(ListingController):
where = 'new'
title_text = _('newest submissions')
extra_page_classes = ['new-page']
def keep_fn(self):
def keep(item):
@@ -438,6 +440,7 @@ class NewController(ListingController):
class RisingController(NewController):
where = 'rising'
title_text = _('rising submissions')
extra_page_classes = ['rising-page']
def query(self):
return get_rising(c.site)
@@ -477,8 +480,10 @@ class BrowseController(ListingController):
self.sort = sort
if sort == 'top':
self.title_text = _('top scoring links')
self.extra_page_classes = ['top-page']
elif sort == 'controversial':
self.title_text = _('most controversial links')
self.extra_page_classes = ['controversial-page']
else:
# 'sort' is forced to top/controversial by routing.py,
# but in case something has gone wrong...