blog flux rss
authorLaure Bourgois <Laure.Bourgois@logilab.fr>
Thu, 20 Nov 2008 11:51:28 +0100
changeset 107 4fe4ce7e2544
parent 106 fa179de1a787
child 108 60faaa480f02
child 125 979dbe0cade3
blog flux rss
web/views/boxes.py
--- 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"""