add preference to remove recently clicked widget

This commit is contained in:
spez
2009-06-03 10:32:07 -07:00
parent be6b627fec
commit ae9eaf5575
4 changed files with 9 additions and 0 deletions

View File

@@ -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')

View File

@@ -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,

View File

@@ -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

View File

@@ -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>