remplacing tables by div for right (and left) box layout
authorLaure Bourgois <Laure.Bourgois@logilab.fr>
Fri, 27 Feb 2009 17:27:21 +0100
changeset 988 b73f3cd23d43
parent 979 93447d75c4b9
child 989 c10485f92dd6
remplacing tables by div for right (and left) box layout
web/views/baseviews.py
--- a/web/views/baseviews.py	Fri Feb 27 09:59:53 2009 +0100
+++ b/web/views/baseviews.py	Fri Feb 27 17:27:21 2009 +0100
@@ -158,22 +158,27 @@
         self.render_entity_metadata(entity)
         # entity's attributes and relations, excluding meta data
         # if the entity isn't meta itself
-        self.w(u'<table border="0" width="100%">')
-        self.w(u'<tr>')
-        self.w(u'<td valign="top">')
+        #self.w(u'<table border="0" width="100%">')
+        #self.w(u'<tr>')
+        #self.w(u'<td valign="top">')
+        self.w(u'<div>')
         self.w(u'<div class="mainInfo">')
         self.render_entity_attributes(entity, siderelations)
         self.w(u'</div>')
         self.content_navigation_components('navcontenttop')
         if self.main_related_section:
             self.render_entity_relations(entity, siderelations)
-        self.w(u'</td>')
+        self.w(u'</div>')
+        #self.w(u'</td>')
         # side boxes
-        self.w(u'<td valign="top">')
+        #self.w(u'<td valign="top">')
+        self.w(u'<div class="primaryRight">')
         self.render_side_related(entity, siderelations)
-        self.w(u'</td>')
-        self.w(u'</tr>')
-        self.w(u'</table>')        
+        self.w(u'</div>')
+        self.w(u'<div class="clear"></div>')#verifier
+        #self.w(u'</td>')
+        #self.w(u'</tr>')
+        #self.w(u'</table>')        
         self.content_navigation_components('navcontentbottom')
 
     def content_navigation_components(self, context):
@@ -266,40 +271,40 @@
             sideboxes = [(label, rset) for label, rset in self.get_side_boxes_defs(entity)
                          if rset]
             if sideboxes:
-                self.w(u'<table width="100%">')
+                #self.w(u'<table width="100%">')
                 for label, rset in sideboxes:
-                    self.w(u'<tr><td>')
+                    #self.w(u'<tr><td>')
                     self.w(u'<div class="sideRelated">')
                     self.wview('sidebox', rset, title=label)
                     self.w(u'</div>')
-                    self.w(u'</td></tr>')
-                self.w(u'</table>')
+                    #self.w(u'</td></tr>')
+                #self.w(u'</table>')
         elif siderelations:
-            self.w(u'<table width="100%">')
-            self.w(u'<tr><td>')
+            #self.w(u'<table 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'</td></tr>')
-            self.w(u'</table>')
+            #self.w(u'</td></tr>')
+            #self.w(u'</table>')
         boxes = list(self.vreg.possible_vobjects('boxes', self.req, self.rset,
                                                  row=self.row, view=self,
                                                  context='incontext'))
         if boxes:
-            self.w(u'<table width="100%">')
+            #self.w(u'<table width="100%">')
             for box in boxes:
-                self.w(u'<tr><td>')
+                #self.w(u'<tr><td>')
                 try:
                     box.dispatch(w=self.w, row=self.row)
                 except NotImplementedError:
                     # much probably a context insensitive box, which only implements
                     # .call() and not cell_call()
                     box.dispatch(w=self.w)
-                self.w(u'</td></tr>')
-            self.w(u'</table>')
+                #self.w(u'</td></tr>')
+            #self.w(u'</table>')
                 
     def is_side_related(self, rschema, eschema):
         return rschema.meta and \