Add a preference for trending on the front page

This commit is contained in:
umbrae
2014-04-10 17:59:17 -04:00
committed by Max Goodman
parent 245cd4582f
commit a453758924
4 changed files with 13 additions and 0 deletions

View File

@@ -345,6 +345,9 @@ class HotController(ListingWithPromos):
@classmethod
def trending_info(cls):
if not c.user.pref_show_trending:
return None
trending_data = trending.get_trending_subreddits()
if not trending_data:

View File

@@ -66,6 +66,7 @@ PREFS_VALIDATORS = dict(
pref_show_adbox=VBoolean("show_adbox"),
pref_show_sponsors=VBoolean("show_sponsors"),
pref_show_sponsorships=VBoolean("show_sponsorships"),
pref_show_trending=VBoolean("show_trending"),
pref_highlight_new_comments=VBoolean("highlight_new_comments"),
pref_monitor_mentions=VBoolean("monitor_mentions"),
)

View File

@@ -93,6 +93,7 @@ class Account(Thing):
pref_show_adbox = True,
pref_show_sponsors = True, # sponsored links
pref_show_sponsorships = True,
pref_show_trending=True,
pref_highlight_new_comments = True,
pref_monitor_mentions=True,
pref_collapse_left_bar=False,

View File

@@ -144,6 +144,14 @@
<p>${checkbox(_("show me new links on the front page"), "organic")}</p>
%endif
<p>
${checkbox(_("show trending subreddits on the front page"), "show_trending")}
&#32;
<span class="little gray">
${_("(a list of popular and notable subreddits to check out)")}
</span>
</p>
<p>${checkbox(_("show me links I've recently viewed"), "clickgadget")}</p>
<p>${checkbox(_("compress the link display"), "compress")}</p>
<p>${checkbox(_("show additional details in the domain text when available"), "domain_details")}