[tabs] tabbed views don't support concatenation; when vid=primary is forced, delegate to the default tab/view #32176 treeview-tabs
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 03 Mar 2009 12:57:25 +0100
branchtreeview-tabs
changeset 997 ee71c2ba73e6
parent 931 7b701df4dbef
child 998 9c6ce9d6384f
[tabs] tabbed views don't support concatenation; when vid=primary is forced, delegate to the default tab/view #32176
web/views/tabs.py
--- a/web/views/tabs.py	Mon Feb 23 19:22:59 2009 +0100
+++ b/web/views/tabs.py	Tue Mar 03 12:57:25 2009 +0100
@@ -1,7 +1,7 @@
 """base classes to handle tabbed views
 
 :organization: Logilab
-:copyright: 2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+:copyright: 2008-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
 """
 
@@ -97,6 +97,11 @@
         self.req.add_css('ui.tabs.css')
         self.req.add_js(('ui.core.js', 'ui.tabs.js',
                          'cubicweb.ajax.js', 'cubicweb.tabs.js', 'cubicweb.lazy.js'))
+        # tabbed views do no support concatenation
+        # hence we delegate to the default tab
+        if self.req.form.get('vid') == 'primary':
+            entity.view(default)
+            return
         # prune tabs : not all are to be shown
         tabs = self.prune_tabs(tabs)
         # select a tab