[primary view] default to outofcontext view for entities displayed in boxes stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 07 Oct 2010 18:51:13 +0200
branchstable
changeset 6407 595e6807dda5
parent 6406 39663630ca3c
child 6408 7674f674de40
[primary view] default to outofcontext view for entities displayed in boxes
web/views/boxes.py
--- a/web/views/boxes.py	Thu Oct 07 17:25:24 2010 +0200
+++ b/web/views/boxes.py	Thu Oct 07 18:51:13 2010 +0200
@@ -198,6 +198,9 @@
         """display a list of entities by calling their <item_vid> view"""
         if title:
             self.w(u'<div class="sideBoxTitle"><span>%s</span></div>' % title)
+        if 'dispctrl' in self.cw_extra_kwargs:
+            # XXX do not modify dispctrl!
+            self.cw_extra_kwargs['dispctrl'].setdefault('subvid', 'outofcontext')
         self.w(u'<div class="%s"><div class="sideBoxBody">' % boxclass)
         self.wview('autolimited', self.cw_rset, **self.cw_extra_kwargs)
         self.w(u'</div>\n</div>\n')