diff --git a/view/Link_area.py b/view/Link_area.py index 5ad8ef6..662faa4 100644 --- a/view/Link_area.py +++ b/view/Link_area.py @@ -4,7 +4,7 @@ from Search_form import Search_form class Link_area( Div ): - def __init__( self, notebooks, notebook, parent_id, notebook_path, user ): + def __init__( self, notebooks, notebook, parent_id, notebook_path, updates_path, user ): linked_notebooks = [ nb for nb in notebooks if ( nb.read_write or not nb.name.startswith( u"Luminotes" ) ) and nb.name not in ( u"trash" ) and @@ -36,14 +36,25 @@ class Link_area( Div ): u"subscribe to rss", href = u"%s?rss" % notebook_path, id = u"rss link", - title = u"Subscribe to the RSS feed for " + \ - ( ( notebook.name == u"Luminotes blog" ) and u"the Luminotes blog." or u"this notebook." ), + title = u"Subscribe to the RSS feed for the Luminotes blog.", ), A( Img( src = u"/static/images/rss.png", width = u"14", height = u"14", class_ = u"rss_image" ), href = u"%s?rss" % notebook_path, - title = u"Subscribe to the RSS feed for " + \ - ( ( notebook.name == u"Luminotes blog" ) and u"the Luminotes blog." or u"this notebook." ), + title = u"Subscribe to the RSS feed for the Luminotes blog.", + ), + class_ = u"link_area_item", + ) or Div( + A( + u"subscribe to rss", + href = updates_path, + id = u"rss link", + title = u"Subscribe to the RSS feed for this notebook.", + ), + A( + Img( src = u"/static/images/rss.png", width = u"14", height = u"14", class_ = u"rss_image" ), + href = updates_path, + title = u"Subscribe to the RSS feed for this notebook.", ), class_ = u"link_area_item", ) or None, diff --git a/view/Main_page.py b/view/Main_page.py index e30cc2c..82e9f90 100644 --- a/view/Main_page.py +++ b/view/Main_page.py @@ -1,3 +1,4 @@ +from urllib import urlencode from cgi import escape from Page import Page from Header import Header @@ -82,6 +83,10 @@ class Main_page( Page ): else: notebook_path = u"/notebooks/%s" % notebook.object_id + updates_path = u"/notebooks/updates/%s?rss&%s" % ( + notebook.object_id, + urlencode( [ ( u"notebook_name", notebook.name ) ] ), + ) conversion_html = None if conversion: @@ -111,7 +116,8 @@ class Main_page( Page ): title, Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/header.css" ), ( notebook.name == u"Luminotes blog" ) \ - and Link( rel = u"alternate", type = u"application/rss+xml", title = u"Luminotes blog", href = "/blog?rss" ) or None, + and Link( rel = u"alternate", type = u"application/rss+xml", title = u"Luminotes blog", href = "/blog?rss" ) \ + or Link( rel = u"alternate", type = u"application/rss+xml", title = notebook.name, href = updates_path ), Script( type = u"text/javascript", src = u"/static/js/MochiKit.js" ) or None, Script( type = u"text/javascript", src = u"/static/js/Invoker.js" ) or None, Script( type = u"text/javascript", src = u"/static/js/Editor.js" ) or None, @@ -147,7 +153,7 @@ class Main_page( Page ): ), id = u"left_area", ), - Link_area( notebooks, notebook, parent_id, notebook_path, user ), + Link_area( notebooks, notebook, parent_id, notebook_path, updates_path, user ), Div( Rounded_div( ( notebook.name == u"trash" ) and u"trash_notebook" or u"current_notebook",