Only show the listing chooser on html pages.

This fixes a listing chooser template error on non-html styles.
This commit is contained in:
Max Goodman
2013-04-10 17:39:39 -07:00
parent 46a4457233
commit 68d247388f

View File

@@ -116,6 +116,7 @@ class ListingController(RedditController, OAuth2ResourceController):
content = self.content()
page_classes = self.extra_page_classes
if (self.show_chooser and
c.render_style == "html" and
c.user_is_loggedin and c.user.pref_show_left_bar and
isinstance(c.site, (DefaultSR, AllSR, LabeledMulti))):
page_classes = page_classes + ['with-listing-chooser']