mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-27 07:48:16 -05:00
add preference to remove recently clicked widget
This commit is contained in:
@@ -87,6 +87,7 @@ class PostController(ApiController):
|
||||
return self.redirect(request.referer)
|
||||
|
||||
@validate(pref_frame = VBoolean('frame'),
|
||||
pref_clickgadget = VBoolean('clickgadget'),
|
||||
pref_organic = VBoolean('organic'),
|
||||
pref_newwindow = VBoolean('newwindow'),
|
||||
pref_public_votes = VBoolean('public_votes'),
|
||||
@@ -104,6 +105,10 @@ class PostController(ApiController):
|
||||
pref_show_stylesheets = VBoolean('show_stylesheets'),
|
||||
all_langs = nop('all-langs', default = 'all'))
|
||||
def POST_options(self, all_langs, pref_lang, **kw):
|
||||
#temporary. eventually we'll change pref_clickgadget to an
|
||||
#integer preference
|
||||
kw['pref_clickgadget'] = kw['pref_clickgadget'] and 5 or 0
|
||||
|
||||
self.set_options(all_langs, pref_lang, **kw)
|
||||
u = UrlParser(c.site.path + "prefs")
|
||||
u.update_query(done = 'true')
|
||||
|
||||
@@ -41,6 +41,7 @@ class Account(Thing):
|
||||
pref_frame = False,
|
||||
pref_frame_commentspanel = False,
|
||||
pref_newwindow = False,
|
||||
pref_clickgadget = 5,
|
||||
pref_public_votes = False,
|
||||
pref_hide_ups = False,
|
||||
pref_hide_downs = False,
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
################################################################################
|
||||
<%namespace file="printable.html" import="simple_button" />
|
||||
|
||||
%if c.user.pref_clickgadget:
|
||||
<div class="gadget" style="display: none;">
|
||||
<h2>${_("Recently viewed links")}</h2>
|
||||
|
||||
@@ -32,3 +33,4 @@
|
||||
${simple_button(_("clear"), "clear_clicked_items")}
|
||||
</div>
|
||||
</div>
|
||||
%endif
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
<th>${_("link options")}</th>
|
||||
<td class="prefright">
|
||||
<p>${checkbox(_("show me new links on the front page"), "organic")}</p>
|
||||
<p>${checkbox(_("show me links I've recently viewed"), "clickgadget")}</p>
|
||||
<p>${checkbox(_("compress the link display"), "compress")}</p>
|
||||
<p>${checkbox(_("don't show links after i've liked them"), "hide_ups")}</p>
|
||||
<p>${checkbox(_("don't show links after i've disliked them"), "hide_downs")}</p>
|
||||
|
||||
Reference in New Issue
Block a user