From 8174538a010dafe9be20e0d361b4096c9e8123fe Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 21 Nov 2012 07:40:10 +0100 Subject: Name of the currently consulted article is displayed on the tab. --- source/pyAggr3g470r.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index 2e831aa3..9a16d437 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -77,14 +77,14 @@ def handle_error(): cherrypy.response.status = 500 cherrypy.response.body = [html] -def htmlheader(nb_unread_articles=""): +def htmlheader(text=""): """ Return the header of the HTML page with the number of unread articles in the 'title' HTML tag.. """ return '\n' + \ '' + \ - '\n\t'+ nb_unread_articles +'pyAggr3g470r - News aggregator\n' + \ + '\n\t'+ text +' - pyAggr3g470r - News aggregator\n' + \ '\t' + \ '\n\t\n' + \ '\n\t\n' + \ @@ -143,7 +143,7 @@ class pyAggr3g470r(object): # if there are unread articles, display the number in the tab of the browser html = htmlheader((nb_unread_articles and \ - ['(' + str(nb_unread_articles) +') '] or \ + ['(' + str(nb_unread_articles) +')'] or \ [""])[0]) html += htmlnav html += self.create_right_menu() @@ -447,7 +447,7 @@ class pyAggr3g470r(object): article = self.mongo.get_article(feed_id, article_id) except: return self.error_page("Bad URL. This article do not exists.") - html = htmlheader() + html = htmlheader(article["article_title"]) html += htmlnav html += """
""" -- cgit