aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-03-04 00:26:33 +0100
committercedricbonhomme <devnull@localhost>2012-03-04 00:26:33 +0100
commitf65f4e936e890dea064628d1a457f0db93ceb757 (patch)
treea3f14c4d7034b7a0d920c35772e0ec9ed0b22dc6 /pyAggr3g470r.py
parentMark all articles as read (from the main page) is working. (diff)
downloadnewspipe-f65f4e936e890dea064628d1a457f0db93ceb757.tar.gz
newspipe-f65f4e936e890dea064628d1a457f0db93ceb757.tar.bz2
newspipe-f65f4e936e890dea064628d1a457f0db93ceb757.zip
Notifications page is working. Improved get_all_collections function.
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-xpyAggr3g470r.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index ccb47150..72c8272e 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -983,11 +983,14 @@ class Root:
html = htmlheader()
html += htmlnav
html += """<div class="left inner">"""
- html += "<h1>You are receiving e-mails for the following feeds:</h1>\n"
- for feed in self.feeds.values():
- if feed.mail == "1":
+ feeds = self.articles.get_all_collections(condition=("mail",True))
+ if feeds != []:
+ html += "<h1>You are receiving e-mails for the following feeds:</h1>\n"
+ for feed in feeds:
html += """\t<a href="/articles/%s">%s</a> - <a href="/mail_notification/0:%s">Stop</a><br />\n""" % \
- (feed.feed_id, feed.feed_title, feed.feed_id)
+ (feed["feed_id"], feed.feed_title, feed.feed_id)
+ else:
+ html += "<p>No active notifications.<p>\n"
html += """<p>Notifications are sent to: <a href="mail:%s">%s</a></p>""" % \
(utils.mail_to, utils.mail_to)
html += "\n<hr />\n" + htmlfooter
bgstack15