aboutsummaryrefslogtreecommitdiff
path: root/source/static
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-03-28 09:48:26 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-03-28 09:48:26 +0100
commitb51fef13f40421b4e98b5a8b29894e8f8ac91205 (patch)
tree654396c3958d73f9bdb40305973b66cb1bc9e009 /source/static
parentdon't print the tree. (diff)
downloadnewspipe-b51fef13f40421b4e98b5a8b29894e8f8ac91205.tar.gz
newspipe-b51fef13f40421b4e98b5a8b29894e8f8ac91205.tar.bz2
newspipe-b51fef13f40421b4e98b5a8b29894e8f8ac91205.zip
Minor fix to the /feed view when a feed has no articles.
Diffstat (limited to 'source/static')
-rw-r--r--source/static/templates/feed.html22
1 files changed, 13 insertions, 9 deletions
diff --git a/source/static/templates/feed.html b/source/static/templates/feed.html
index f4a35e77..bcc1ec6c 100644
--- a/source/static/templates/feed.html
+++ b/source/static/templates/feed.html
@@ -4,15 +4,21 @@
import utils
%>
<div class="left inner">
- <p>The feed <b>${feed['feed_title']}</b> contains <b>${format(nb_articles_feed, ',d')}</b> articles.
- Representing ${round((nb_articles_feed / nb_articles_total) * 100, 4)} percent of the total (${format(nb_articles_total, ',d')} articles).
- <br />
- Address of the feed: <a href="${feed['feed_link']}">${feed['feed_link']}</a>.
- <br />
- Address of the site: <a href="${feed['site_link']}">${feed['site_link']}</a>.</p>
+ %if articles != []:
+ <p>The feed <b>${feed['feed_title']}</b> contains <b>${format(nb_articles_feed, ',d')}</b> articles.
+ Representing ${round((nb_articles_feed / nb_articles_total) * 100, 4)} percent of the total (${format(nb_articles_total, ',d')} articles).
+ <br />
+ Address of the feed: <a href="${feed['feed_link']}">${feed['feed_link']}</a>.
+ <br />
+ Address of the site: <a href="${feed['site_link']}">${feed['site_link']}</a>.</p>
- %if articles:
<p>${(nb_unread_articles_feed == 0 and ["All articles are read"] or [str(nb_unread_articles_feed) + " unread article" + (nb_unread_articles_feed == 1 and [""] or ["s"])[0]])[0]}.</p>
+ %else:
+ <p>No articles for the feed <b>${feed['feed_title']}</b>.
+ <br />
+ Address of the feed: <a href="${feed['feed_link']}">${feed['feed_link']}</a>.
+ <br />
+ Address of the site: <a href="${feed['site_link']}">${feed['site_link']}</a>.</p>
%endif
%if feed["mail"] == True:
@@ -96,8 +102,6 @@ import utils
%endfor
${html}
%endif
- %else:
- <p>No articles yet.</p>
%endif
bgstack15