if siderelation wrapp boxes into tables
authorLaure Bourgois <Laure.Bourgois@logilab.fr>
Mon, 23 Feb 2009 14:54:55 +0100
changeset 925 84e823429f06
parent 924 65f278630d0c
child 926 6d3d693c0ad5
if siderelation wrapp boxes into tables fix typo on width
web/views/baseviews.py
--- a/web/views/baseviews.py	Mon Feb 23 12:16:43 2009 +0100
+++ b/web/views/baseviews.py	Mon Feb 23 14:54:55 2009 +0100
@@ -244,7 +244,7 @@
         """
         if hasattr(self, 'get_side_boxes_defs'):
             if rset:
-                self.w(u'<table align="right" with="100%">')
+                self.w(u'<table align="right" width="100%">')
                 for label, rset in self.get_side_boxes_defs(entity):
                     self.w(u'<tr><td>')
                     self.w(u'<div class="sideRelated">')
@@ -253,13 +253,17 @@
                     self.w(u'</td></tr>')
                 self.w(u'</table>')
         elif siderelations:
+            self.w(u'<table align="right" width="100%">')
+            self.w(u'<tr><td>')
             self.w(u'<div class="sideRelated">')
             for relatedinfos in siderelations:
                 # if not relatedinfos[0].meta:
                 #    continue
                 self._render_related_entities(entity, *relatedinfos)
             self.w(u'</div>')
-        self.w(u'<table  align="right" with="100%">')
+            self.w(u'</td></tr>')
+            self.w(u'</table>')
+        self.w(u'<table  align="right" width="100%">')
         for box in self.vreg.possible_vobjects('boxes', self.req, self.rset,
                                                row=self.row, view=self,
                                                context='incontext'):