[views] take into account subvid form param in SameETypeListView
authorLaura Médioni <laura.medioni@logilab.fr>
Thu, 19 Mar 2015 11:30:37 +0100
changeset 10384 8f05aaabf355
parent 10374 699e49d76334
child 10410 eb681a030699
[views] take into account subvid form param in SameETypeListView closes #5098473
web/views/baseviews.py
--- a/web/views/baseviews.py	Wed May 13 17:12:41 2015 +0200
+++ b/web/views/baseviews.py	Thu Mar 19 11:30:37 2015 +0100
@@ -401,10 +401,11 @@
         showtitle = kwargs.pop('showtitle', not 'vtitle' in self._cw.form)
         if showtitle:
             self.w(u'<h1>%s</h1>' % self.title)
-        super(SameETypeListView, self).call(**kwargs)
+        subvid = self._cw.form.pop('subvid', None)
+        super(SameETypeListView, self).call(vid=subvid, **kwargs)
 
-    def cell_call(self, row, col=0, **kwargs):
-        self.wview(self.item_vid, self.cw_rset, row=row, col=col, **kwargs)
+    def cell_call(self, row, col=0, vid=None, **kwargs):
+        self.wview(self.item_vid, self.cw_rset, row=row, col=col, vid=vid, **kwargs)
 
 
 class SameETypeListItemView(EntityView):