aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-03-18 09:08:05 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-03-18 09:08:05 +0100
commit543c7590d8e8e273618e9584ad78a9049339192b (patch)
treeee571c99433cd439f0f4653beb00ab4ccfc10994 /source
parentThe plain_text views and plain_text template has been removed. There is now a... (diff)
downloadnewspipe-543c7590d8e8e273618e9584ad78a9049339192b.tar.gz
newspipe-543c7590d8e8e273618e9584ad78a9049339192b.tar.bz2
newspipe-543c7590d8e8e273618e9584ad78a9049339192b.zip
It is now possible to switch between the plain text and the HTML version of the article.
Diffstat (limited to 'source')
-rwxr-xr-xsource/pyAggr3g470r.py2
-rw-r--r--source/static/templates/article.html6
2 files changed, 6 insertions, 2 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index e7beac47..5e9dba22 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -255,7 +255,7 @@ class pyAggr3g470r(object):
tmpl = lookup.get_template("article.html")
return tmpl.render(header_text=article["article_title"], article=article, previous=previous, following=following, \
- diaspora=conf.DIASPORA_POD, feed=feed, description=description)
+ diaspora=conf.DIASPORA_POD, feed=feed, description=description, plain_text=plain_text)
article.exposed = True
diff --git a/source/static/templates/article.html b/source/static/templates/article.html
index 123aaa9f..ec0addb9 100644
--- a/source/static/templates/article.html
+++ b/source/static/templates/article.html
@@ -19,7 +19,11 @@
</div>
<hr />
- <a href="/article/${feed['feed_id']}:${article['article_id']}/?plain_text=1">Plain text</a>
+ %if plain_text == "1":
+ <a href="/article/${feed['feed_id']}:${article['article_id']}">HTML version</a>
+ %else:
+ <a href="/article/${feed['feed_id']}:${article['article_id']}/?plain_text=1">Plain text</a>
+ %endif
- <a href="/epub/${feed['feed_id']}:${article['article_id']}">Export to EPUB</a>
<br />
<a href="${article['article_link']}">Complete story</a>
bgstack15