aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-06-20 19:27:27 +0200
committercedricbonhomme <devnull@localhost>2011-06-20 19:27:27 +0200
commit9e084bfe7f987f0bf1b319834c3265bff7e97f36 (patch)
tree4d73298aabe8ebaf782fe63c7c7495906d85653d /pyAggr3g470r.py
parentIt is now possible to change the name of a feed anytime via the feed manageme... (diff)
downloadnewspipe-9e084bfe7f987f0bf1b319834c3265bff7e97f36.tar.gz
newspipe-9e084bfe7f987f0bf1b319834c3265bff7e97f36.tar.bz2
newspipe-9e084bfe7f987f0bf1b319834c3265bff7e97f36.zip
It is now possible to change the logo of a feed anytime via the feed management page. The data base is automatically uptodated.
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-xpyAggr3g470r.py36
1 files changed, 30 insertions, 6 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index 57f2db1f..b9ee6d07 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -643,12 +643,21 @@ class Root:
# - feed name;
# - URL of the feed (not the site);
html += "<br />\n<h1>Edit this feed</h1>\n"
- html += """\n\n<form method=post action="/change_feed_name/"><input type="text" name="new_feed_name" value="" placeholder="Enter a new name." maxlength=2048 autocomplete="on" size="50" /><input type="hidden" name="feed_url" value="%s" /></form>\n""" % \
- (feed.feed_link,)
- html += """\n\n<form method=post action="/change_feed_url/"><input type="url" name="new_feed_url" value="" placeholder="Enter a new URL to retrieve articles." maxlength=2048 autocomplete="on" size="50" /><input type="hidden" name="old_feed_url" value="%s" /></form>\n""" % \
- (feed.feed_link,)
- html += """\n\n<form method=post action="/change_feed_logo/"><input type="url" name="new_feed_logo" value="" placeholder="Enter the URL of the logo." maxlength=2048 autocomplete="on" size="50" /><input type="hidden" name="feed_url" value="%s" /></form>\n""" % \
- (feed.feed_link,)
+ html += '\n\n<form method=post action="/change_feed_name/">' + \
+ '<input type="text" name="new_feed_name" value="" ' + \
+ 'placeholder="Enter a new name." maxlength=2048 autocomplete="on" size="50" />' + \
+ """<input type="hidden" name="feed_url" value="%s" /></form>\n""" % \
+ (feed.feed_link,)
+ html += '\n\n<form method=post action="/change_feed_url/">' + \
+ '<input type="url" name="new_feed_url" value="" ' + \
+ 'placeholder="Enter a new URL to retrieve articles." maxlength=2048 autocomplete="on" size="50" />' + \
+ """<input type="hidden" name="old_feed_url" value="%s" /></form>\n""" % \
+ (feed.feed_link,)
+ html += '\n\n<form method=post action="/change_feed_logo/">' + \
+ '<input type="url" name="new_feed_logo" value="" ' + \
+ 'placeholder="Enter the URL of the logo." maxlength=2048 autocomplete="on" size="50" />' + \
+ """<input type="hidden" name="feed_url" value="%s" /></form>\n""" % \
+ (feed.feed_link,)
dic = {}
dic[feed.feed_id] = self.feeds[feed.feed_id]
@@ -1137,6 +1146,21 @@ class Root:
return html
change_feed_name.exposed = True
+
+ def change_feed_logo(self, feed_url, new_feed_logo):
+ """
+ Enables to change the name of a feed.
+ """
+ html = htmlheader()
+ html += htmlnav
+ html += """<div class="left inner">"""
+ utils.change_feed_logo(feed_url, new_feed_logo)
+ html += "<p>The logo of the feed has been changed.</p>"
+ html += "<hr />\n"
+ html += htmlfooter
+ return html
+
+ change_feed_logo.exposed = True
def set_max_articles(self, max_nb_articles=1):
bgstack15