From 302a19f6b2a0fc1c3d5d969ab7f93a98ef70462b Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Mon, 15 Nov 2010 22:16:54 +0100 Subject: Added HTML 5 date picker for the history page (for the moment only works with Opera). --- pyAggr3g470r.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py index b9f0d41e..2a078172 100755 --- a/pyAggr3g470r.py +++ b/pyAggr3g470r.py @@ -196,7 +196,7 @@ class Root: html += """History
\n""" html += """Fetch all feeds
\n""" html += """Mark articles as read\n""" - html += """
\n""" + html += """
\n""" html += "
\n" # insert the list of feeds in the menu html += self.create_list_of_feeds() @@ -235,7 +235,7 @@ class Root: html += htmlnav html += """
\n""" html += "

Add Feeds

\n" - html += """
\n\n
\n""" if self.articles: @@ -285,7 +285,7 @@ class Root: # Tags cloud html += 'Minimum size of a word:' html += '
' - html += '' + html += '' html += '
\n' html += '

Tag cloud

\n' html += '
' + \ @@ -655,7 +655,7 @@ class Root: language.exposed = True - def history(self, querystring="all"): + def history(self, querystring="all", m=""): """ History """ @@ -663,12 +663,17 @@ class Root: html += htmlnav html += """
\n""" + if m != "": + #the_year, the_month = m.split('-') + querystring = """year:%s-month:%s""" % tuple(m.split('-')) + if querystring == "all": - html += "

Chose a year


\n" + html += "

Search with tags cloud

\n" + html += "

Choose a year


\n" if "year" in querystring: the_year = querystring.split('-')[0].split(':')[1] if "month" not in querystring: - html += "

Chose a month for " + the_year + "


\n" + html += "

Choose a month for " + the_year + "


\n" if "month" in querystring: the_month = querystring.split('-')[1].split(':')[1] html += "

Articles of "+ calendar.month_name[int(the_month)] + \ @@ -730,8 +735,9 @@ class Root: html += '
' + \ utils.tag_cloud([(elem, timeline[elem]) for elem in timeline.keys()], \ query) + '
' - - html += "\n
\n" + html += '

Search with a month+year picker

\n' + html += '
\n\t\n\t\n
' + html += '
' html += htmlfooter return html -- cgit