web/views/boxes.py
changeset 107 4fe4ce7e2544
parent 0 b97547f5f1fa
child 125 979dbe0cade3
--- a/web/views/boxes.py	Wed Nov 19 17:47:27 2008 -0800
+++ b/web/views/boxes.py	Thu Nov 20 11:51:28 2008 +0100
@@ -194,11 +194,16 @@
     visible = False
     
     def call(self, **kwargs):
-        url = html_escape(self.build_url(rql=self.limited_rql(), vid='rss'))
+        eid = self
+        if len(self.rset)==1:
+            eid = self.rset[0][0]
+            rql = 'Any E WHERE E is BlogEntry, E entry_of X, X eid %s' % eid
+        else:
+            rql = self.limited_rql()
+        url = html_escape(self.build_url(rql=rql, vid='rss'))
         rss = self.req.external_resource('RSS_LOGO')
         self.w(u'<a href="%s"><img src="%s" border="0" /></a>\n' % (url, rss))
 
-
 ## warning("schemabox ne marche plus pour le moment")
 ## class SchemaBox(BoxTemplate):
 ##     """display a box containing link to list of entities by type"""