fixes to lite and wired templates to use new domain scheme.

This commit is contained in:
KeyserSosa
2008-09-10 11:31:04 -07:00
parent 3b329edc6b
commit 2577a59606
5 changed files with 14 additions and 16 deletions

View File

@@ -22,14 +22,15 @@
<%!
from pylons.i18n import _
from r2.lib.template_helpers import get_domain
%>
<h3><a href="http://${c.domain}/">
<h3><a href="http://${get_domain()}/">
<img src="http://sp.reddit.com/reddithead4.gif" alt="" />
</a>
<%
link = '<a href="http://%s/">reddit</a></h3>' % c.domain
label = _("link from %(site)s")
label = label.replace(" ", "&nbsp;");
link = '<a href="http://%s/">reddit</a></h3>' % get_domain()
label = _("link from %(site)s")
label = label.replace(" ", "&nbsp;");
%>
${unsafe(label % dict(site = link))}

View File

@@ -23,6 +23,7 @@
<%!
from pylons.i18n import _, ungettext
from r2.lib.filters import safemarkdown
from r2.lib.template_helpers import get_domain
%>
<%inherit file="printable.htmllite" />
@@ -35,7 +36,7 @@
<%def name="entry()">
<small>
<a href="http://${c.domain}}/user/${thing.author.name}">
<a href="http://${get_domain()}/user/${thing.author.name}">
<b>${thing.author.name}</b></a>
<span id="score_${thing._fullname}">${thing.score} ${ungettext("point", "points", thing.score)} </span>
${thing.timesince}

View File

@@ -22,6 +22,7 @@
<%!
from pylons.i18n import _, ungettext
from r2.lib.template_helpers import get_domain
%>
<%inherit file="printable.htmllite" />
@@ -37,10 +38,10 @@
com_label = _("comment")
%>
<link>\
<a href="http://${c.domain}/goto?rss=true&amp;id=${thing._fullname}">
<a href="${thing.url}">
${thing.title}</a><br />
<small>
${thing.score} ${ungettext("point", "points", thing.score)} |
&nbsp;<a href="http://${c.domain}${thing.permalink}">${com_label}</a>
&nbsp;<a href="http://${get_domain(subreddit=False)}${thing.permalink}">${com_label}</a>
</small>
</%def>

View File

@@ -22,24 +22,19 @@
<%!
from pylons.i18n import _, ungettext
from r2.lib.template_helpers import get_domain
%>
<%inherit file="printable.htmllite" />
<%def name="entry()">
<tr><td valign="top" rowspan="2" class="number">$num</td>
<td>
<%
if thing.is_self and not thing.url.startswith("http://"):
url = "http://%s%s" % ( g.domain, thing.url )
else:
url = thing.url
%>
<a target="reddit_pop" href="${url}" class="title">${thing.title}</a>
<a target="reddit_pop" href="${thing.url}" class="title">${thing.title}</a>
<span class="small">&nbsp;(${thing.domain})</span>
</td>
<tr><td class="small byline">${thing.score} ${ungettext("point", "points", thing.score)}
by &nbsp; <a target="reddit_pop" class="user" href="http://${c.domain}/user/${thing.author.name}">${thing.author.name}</a>
&nbsp [<a target="reddit_pop" class="comments" href="http://${c.domain}${thing.permalink}">
by &nbsp; <a target="reddit_pop" class="user" href="http://${get_domain()}/user/${thing.author.name}">${thing.author.name}</a>
&nbsp [<a target="reddit_pop" class="comments" href="http://${get_domain(subreddit=False)}${thing.permalink}">
${thing.num_comments} ${ungettext("comment", "comments", thing.num_comments or 0)}</a>]
<td>
</tr>

View File