when fields are displayed in a table and label should'nt be displayed, set colspan to 2 on the field value cell stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 02 Dec 2009 14:35:23 +0100
branchstable
changeset 3969 970a748684b5
parent 3968 e8dbad65a7a2
child 3970 e4ad7663610b
when fields are displayed in a table and label should'nt be displayed, set colspan to 2 on the field value cell
view.py
--- a/view.py	Wed Dec 02 13:22:50 2009 +0100
+++ b/view.py	Wed Dec 02 14:35:23 2009 +0100
@@ -312,7 +312,10 @@
             else:
                 w(u'<span>%s</span> ' % label)
         if table:
-            w(u'<td>%s</td></tr>' % value)
+            if not (show_label and label):
+                w(u'<td colspan="2">%s</td></tr>' % value)
+            else:
+                w(u'<td>%s</td></tr>' % value)
         else:
             w(u'<span>%s</span></div>' % value)