Commit 043ad6d9 authored by Sebastien Robin's avatar Sebastien Robin

we should not display None, if there is no tab and no column


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2408 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b70e11cb
...@@ -196,12 +196,15 @@ class MatrixBoxWidget(Widget.Widget): ...@@ -196,12 +196,15 @@ class MatrixBoxWidget(Widget.Widget):
list_result_tab = [[tab[1]]] list_result_tab = [[tab[1]]]
# Create the header of the table - this should probably become DTML # Create the header of the table - this should probably become DTML
first_tab = tab[1]
if first_tab is None:
first_tab = ''
header = """\ header = """\
<!-- Matrix Content --> <!-- Matrix Content -->
%s<br> %s<br>
<div class="ListContent"> <div class="ListContent">
<table cellpadding="0" cellspacing="0" border="0"> <table cellpadding="0" cellspacing="0" border="0">
""" % tab[1] """ % first_tab
# Create the footer. This should be replaced by DTML # Create the footer. This should be replaced by DTML
# And work as some kind of parameter # And work as some kind of parameter
...@@ -224,8 +227,11 @@ class MatrixBoxWidget(Widget.Widget): ...@@ -224,8 +227,11 @@ class MatrixBoxWidget(Widget.Widget):
""" """
for cname in columns: for cname in columns:
first_column = cname[1]
if first_column is None:
first_column = ''
list_header = list_header + ("<td class=\"Data\">%s</td>\n" % list_header = list_header + ("<td class=\"Data\">%s</td>\n" %
str(cname[1])) str(first_column))
if render_format == 'list': if render_format == 'list':
list_result_tab[0].append(cname[1]) list_result_tab[0].append(cname[1])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment