Christian Boos wrote:
...
A few suggestions:
* add an easy way to add list of nodes.
 Fragment.__get_item__ should accept iterable,
 as in the example below (TBODY(rows))

I've just realized there's an easy alternative:
1) excerpt of TracIni macro which creates an HTML table:
       ...
       rows = []
       tbody = TBODY()
       for section, configs, section_doc in default_config:
           ...
           row = TR()[TH(rowspan=nconfigs*2)[section]]
           for name, value, since, doc in configs:
               ...
               html_doc = wiki_to_html(doc, self.env, req)
               row.append(TD(class_="name")[name])
               row.append(TD(class_="defaultvalue")[value])
               rows.append(row)
               rows.append(TR()[TD(colspan="2", class_="doc")[html_doc]])
tbody.append() instead of rows.append()
               row = TR()
       if not rows:
       if not tbody.children:
           return ''
       add_stylesheet(req, 'common/css/about.css')
       return str(DIV(class_="about_config")[
           TABLE()[THEAD()[TR()[TH(class_="section")["Section"],
                                TH(class_="name")["Name"],
TH(class_="defaultvalue")["Default Value"]]],
                   TBODY()[rows]]])
                  tbody]])



-- Christian
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev

Reply via email to