News download: "downloaded from" for touchscreens

News download: Add the "downloaded from" link at the bottom of every
article when using a touchscreen output profile (like the Tablet
profile).
This commit is contained in:
Kovid Goyal 2013-06-19 13:12:14 +05:30
parent 8020f489ca
commit adcc1739a6

View File

@ -387,6 +387,14 @@ class TouchscreenNavBarTemplate(Template):
navbar_t = TABLE(CLASS('touchscreen_navbar')) navbar_t = TABLE(CLASS('touchscreen_navbar'))
navbar_tr = TR() navbar_tr = TR()
if bottom and not url.startswith('file://'):
navbar.append(HR())
text = 'This article was downloaded by '
p = PT(text, STRONG(__appname__), A(url, href=url),
style='text-align:left; max-width: 100%; overflow: hidden;')
p[0].tail = ' from '
navbar.append(p)
navbar.append(BR())
# | Previous # | Previous
if art > 0: if art > 0:
link = A(CLASS('article_link'),_('Previous'),href='%s../article_%d/index.html'%(prefix, art-1)) link = A(CLASS('article_link'),_('Previous'),href='%s../article_%d/index.html'%(prefix, art-1))