From b51fef13f40421b4e98b5a8b29894e8f8ac91205 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Thu, 28 Mar 2013 09:48:26 +0100 Subject: Minor fix to the /feed view when a feed has no articles. --- source/static/templates/feed.html | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'source/static/templates') 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 %>
-

The feed ${feed['feed_title']} contains ${format(nb_articles_feed, ',d')} articles. - Representing ${round((nb_articles_feed / nb_articles_total) * 100, 4)} percent of the total (${format(nb_articles_total, ',d')} articles). -
- Address of the feed: ${feed['feed_link']}. -
- Address of the site: ${feed['site_link']}.

+ %if articles != []: +

The feed ${feed['feed_title']} contains ${format(nb_articles_feed, ',d')} articles. + Representing ${round((nb_articles_feed / nb_articles_total) * 100, 4)} percent of the total (${format(nb_articles_total, ',d')} articles). +
+ Address of the feed: ${feed['feed_link']}. +
+ Address of the site: ${feed['site_link']}.

- %if articles:

${(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]}.

+ %else: +

No articles for the feed ${feed['feed_title']}. +
+ Address of the feed: ${feed['feed_link']}. +
+ Address of the site: ${feed['site_link']}.

%endif %if feed["mail"] == True: @@ -96,8 +102,6 @@ import utils %endfor ${html} %endif - %else: -

No articles yet.

%endif -- cgit