## 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 static, get_domain, add_sr, panel_size from r2.lib.strings import Score %> <%inherit file="reddit.html"/> <%namespace file="utils.html" import="plain_link, logout"/> <%namespace file="printablebuttons.html" import="state_button, comment_button"/> <%namespace file="printable.html" import="thing_css_class, score" /> <%def name="javascript_run()"> ${parent.javascript_run()} reddit.external_frame = true; toolbar = new toolbar_p("${panel_size('expanded')}", "${panel_size('collapsed')}"); <%def name="bodyHTML()">
## everything in here will get rendered off screen for pre-fetching purposes.
%if thing._fullname: ${withlink()} %endif
${_('show url')} %if thing.default_sr: ${_("serendipity")} %else: ${"%(subreddit)s serendipity" % dict (subreddit=thing.site_name)} %endif %if thing.user_is_loggedin: ${thing.user_name} %elif thing._fullname: ${_("login / register")} %endif %if thing.have_messages: ${_('new mail')} %endif ${_('help')} ${_('visit this link without the toolbar')}
%if thing._fullname: ${thing.title} %if thing.domain: (${thing.domain}) %endif %else: ${plain_link(_('click to submit this link to reddit'), thing.submit_url, target="_top", _class="submit")} %endif
<%def name="withlink()"> ## add us to the click cookie ${score(thing, thing.likes, tag='b')} <%def name="arrow(direction, style, message)"> ${message} %if getattr(thing, "votable", True): ${arrow("up", thing.upstyle, _("like"))} ${arrow("down", thing.downstyle, _("dislike"))} %endif %if thing.user_is_loggedin: %if thing.saved: ${state_button("unsave", _("unsave"), "return change_state(this, 'unsave');", "%s" % _("unsaved"), a_class="clickable")} %else: ${state_button("save", _("save"), "return change_state(this, 'save');", "%s" % _("saved"), a_class="clickable")} %endif %if thing.hidden: ${state_button("unhide", _("unhide"), "return change_state(this, 'unhide');", "%s" % _("unhidden"), a_class="clickable")} %else: ${state_button("hide", _("hide"), "return change_state(this, 'hide');", "%s" % _("hide"), a_class="clickable")} %endif %endif ${thing.comment_label} %if thing._fullname and thing.expanded: %endif