[primary] Add possible vid in build_date of primary view, see #3296293
authorVincent Michel <vincent.michel@logilab.fr>
Thu, 14 Nov 2013 16:42:03 +0000
changeset 452 80129c9c24ac
parent 446 e76842185f5b
child 454 770cce40a03b
[primary] Add possible vid in build_date of primary view, see #3296293
views/primary.py
--- a/views/primary.py	Thu Nov 14 13:45:12 2013 +0000
+++ b/views/primary.py	Thu Nov 14 16:42:03 2013 +0000
@@ -37,10 +37,13 @@
     def iterate_data(self, entity):
         return []
 
-    def _build_data(self, data, rql, label):
+    def _build_data(self, data, rql, label, vid=None):
         rset = self._cw.execute(rql)
         if len(rset):
-            url = self._cw.build_url(rql=rql)
+            if not vid:
+                url = self._cw.build_url(rql=rql)
+            else:
+                url = self._cw.build_url(rql=rql, vid=vid)
             ahref = u'<a href="%s">%s</a>' % (url, self._cw._('See all'))
             data.append((label, (len(rset), ahref)))
         return data