## The contents of this file are subject to the Common Public Attribution ## License Version 1.0. (the "License"); you may not use this file except in ## compliance with the License. You may obtain a copy of the License at ## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public ## License Version 1.1, but Sections 14 and 15 have been added to cover use of ## software over a computer network and provide for limited attribution for the ## Original Developer. In addition, Exhibit A has been modified to be ## consistent with Exhibit B. ## ## Software distributed under the License is distributed on an "AS IS" basis, ## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for ## the specific language governing rights and limitations under the License. ## ## The Original Code is reddit. ## ## The Original Developer is the Initial Developer. The Initial Developer of ## the Original Code is reddit Inc. ## ## All portions of the code written by reddit are Copyright (c) 2006-2012 ## reddit Inc. All Rights Reserved. ############################################################################### <%! from r2.lib.template_helpers import add_sr from r2.lib.utils import UrlParser import random %> <%namespace file="utils.html" import="language_tool, language_checkboxes, plain_link"/> <%def name="checkbox(text, name, disabled = False, disabled_text = '', prefix = 'pref_')"> %if disabled and disabled_text: ${disabled_text} %endif <%def name="link_options()"> <%def name="media_radio(val, label)">
<%def name="num_input(s, name)"> %if c.user_is_loggedin and thing.done:

${_("your preferences have been updated")}

%endif <% if c.user_is_loggedin: action = "/post/options" else: action = "/post/unlogged_options" if not c.frameless_cname: action = add_sr(action, sr_path = False, nocname=True) %>
%if c.cname: %endif %if c.user_is_loggedin: %endif %if c.user.gold: %endif
${_("interface language")} ${language_tool(allow_blank = False, show_regions = True, default_lang = c.user.pref_lang)} (*) ${_("incomplete")} ${plain_link(_("volunteer to translate"), "/i18n")}
${_("content language")} ${language_checkboxes(default = c.user.pref_content_langs)}
${_("clicking options")} ${checkbox(_("display links with a reddit toolbar"), "frame")}
${checkbox(_("open links in a new window"), "newwindow")}
${_("media")} %if not c.user.pref_compress: ${media_radio("on", _("show thumbnails next to links"))} ${media_radio("off", _("don't show thumbnails next to links"))} ${media_radio("subreddit", _("show thumbnails based on that reddit's media preferences"))} ${checkbox(_("make safe(r) for work "), "no_profanity", disabled = not c.user.pref_over_18, disabled_text = "(requires over 18)")} ${_("(Don't show thumbnails next to anything labeled NSFW)")} %else:

${_("to enable thumbnails, disable compressed link display")}

%endif
${_("link options")} %if c.user_is_loggedin and c.user.jury_betatester():

${checkbox(_("show the spotlight box on the front page"), "organic")} ${_("(it shows new and promoted links, and gives you a say in what's spam and what isn't.)")}

%else:

${checkbox(_("show me new links on the front page"), "organic")}

%endif

${checkbox(_("show me links I've recently viewed"), "clickgadget")}

${checkbox(_("compress the link display"), "compress")}

${checkbox(_("don't show links after i've liked them"), "hide_ups")} ${_("(except my own)")}

${checkbox(_("don't show links after i've disliked them"), "hide_downs")} ${_("(except my own)")}

<% # stuff I can soon delete: _("display") _("links at once") _("don't show me sites with a score less than") _("don't show me comments with a score less than") _("comments by default") %>

${unsafe(_("display %(num)s links at once") % \ dict(num=capture(link_options)))}

<% input = capture(num_input, c.user.pref_min_link_score, 'min_link_score') %>

${unsafe(_("don't show me sites with a score less than %(num)s") % dict(num = input))} ${_("(blank for none)")}

${_("comment options")} <% input = capture(num_input, c.user.pref_min_comment_score, 'min_comment_score') %>

${unsafe(_("don't show me comments with a score less than %(num)s") % dict(num = input))} ${_("(blank for none)")}

<% input = capture(num_input, c.user.pref_num_comments, 'num_comments') %> <% s = c.user.pref_num_comments %> ${unsafe(_("display %(num)s comments by default") % \ dict(num = input))} (1 - ${g.max_comments}); ${_("the smaller the number, the faster your comments pages will load")}

${_("messaging options")} ${checkbox(_("show message conversations in the inbox"), \ "threaded_messages")} ${_("(only applies when you go to the 'messages' panel)")}
%if c.user.pref_threaded_messages: ${checkbox(_("collapse messages after I've read them"), \ "collapse_read_messages")} ${_("(otherwise, you'll have to collapse them yourself)")}
%endif ${checkbox(_("mark messages as read when I open my inbox"), \ "mark_messages_read")} ${_("(otherwise, they will be marked as read when you click them)")}
${_("display options")} ${checkbox(_("allow reddits to show me custom styles"), "show_stylesheets")}
${checkbox(_("show user flair"), "show_flair")}
${checkbox(_("show link flair"), "show_link_flair")} %if c.user.pref_show_promote is not None:
${checkbox(_("show promote tab on front page"), "show_promote")} %endif
${_("content options")} ${checkbox(_("i am over eighteen years old and willing to view adult content"), "over_18")} (${_("required to view some reddits")})
${checkbox(_("label posts that are not safe for work (NSFW)"), "label_nsfw", disabled = c.user.pref_no_profanity, disabled_text = "(requires not 'safer for work' mode)")}
${checkbox(_("enable private RSS feeds"), "private_feeds")} ${_("(available from the 'RSS feed' tab in prefs)")}
${_("privacy options")} ${checkbox(_("make my votes public"), "public_votes")} <% link1 = " /user/%s/liked " % (c.user.name, c.user.name) link2 = " /user/%s/disliked" % (c.user.name, c.user.name) %> (${unsafe(_("let everyone see %(link1)s and %(link2)s") % dict(link1=link1, link2=link2))})
${checkbox(_("allow my data to be used for research purposes"), "research")} ( ${_("details")} )
${checkbox(_("don't allow search engines to index my user profile"), "hide_from_robots")} ( ${_("details")} )
${checkbox(_("load core JS libraries from reddit servers"), "local_js")} ( ${_("details")} )
${_("gold options")} ${checkbox(_("show the right sidebar ad box"), "show_adbox")} (${_("the attractive 300x250 one that usually only has reddit t-shirts in it")})
${checkbox(_("show sponsored links"), "show_sponsors")} (${_("the blue advertisements that sometimes appear on the top of the page")})
${checkbox(_("show sponsorships"), "show_sponsorships")} (${_("the 300x100 'sponsored by...' images that sometimes appear in sidebars")})

${checkbox(_("highlight new comments"), "highlight_new_comments")} (${_("we'll remember your visits for 48 hours and show you which comments you haven't seen yet")})