Commit ff0c9961 authored by Vincent Pelletier's avatar Vincent Pelletier

Support empty groups and casse variab=tions in names.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6017 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c8be0780
......@@ -76,8 +76,9 @@
tal:condition="python: layout_form_id and not ignore_layout">\n
<tal:block tal:condition="not: editable_mode" tal:repeat="group python: form.get_groups()">\n
<div tal:attributes="class group" tal:condition="python: group.find(\'content\') >= 0">\n
<tal:block tal:repeat="field python:form.get_fields_in_group(group)"\n
tal:replace="structure python: field.render(None, request)"/>\n
<tal:block tal:repeat="field python:form.get_fields_in_group(group)">\n
<tal:block tal:replace="structure python: field.render(None, request)"/>\n
</tal:block>\n
</div>\n
</tal:block>\n
<tal:block tal:condition="editable_mode" tal:repeat="group python: form.get_groups()">\n
......@@ -101,33 +102,38 @@
<tal:block tal:define="groups python: form.get_groups();\n
rows python:[];">\n
<tal:block tal:repeat="group groups">\n
<tal:block tal:condition="python: not (\'right\' in group) or\n
<tal:block tal:condition="python: not (\'right\' in group.lower()) or\n
len(rows)==0">\n
<tal:block tal:define="dummy python: rows.append([])"/>\n
</tal:block>\n
<tal:block tal:condition="python: \'hidden\' not in group">\n
<tal:block tal:condition="python: len(rows[-1])>1">\n
<tal:block tal:define="dummy python: rows.append([])"/>\n
</tal:block>\n
<tal:block tal:condition="python: \'hidden\' not in group.lower()">\n
<tal:block tal:define="dummy python: rows[-1].append(repeat[\'group\'].index)"/>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:repeat="row rows">\n
<tal:block tal:condition="python: \'bottom\' not in groups[row[0]]">\n
<table width="100%" class="Border">\n
<tr>\n
<td tal:repeat="cell row" valign="top">\n
<table width="100%">\n
<tal:block tal:repeat="field python:form.get_fields_in_group(groups[cell])">\n
<tal:block metal:use-macro="here/field_render/macros/field_render"/>\n
</tal:block>\n
</table>\n
</td>\n
</tr>\n
</table>\n
</tal:block>\n
<tal:block tal:condition="python: \'bottom\' in groups[row[0]]">\n
<tal:block tal:repeat="cell row">\n
<tal:block tal:repeat="field python:form.get_fields_in_group(groups[cell])">\n
<tal:block tal:define="value python:request.get(field.id, None)"\n
tal:replace="structure python:field.render(value, request)" />\n
<tal:block tal:condition="python: len(row)>0">\n
<tal:block tal:condition="python: \'bottom\' not in groups[row[0]]">\n
<table width="100%" class="Border">\n
<tr>\n
<td tal:repeat="cell row" valign="top">\n
<table width="100%">\n
<tal:block tal:repeat="field python:form.get_fields_in_group(groups[cell])">\n
<tal:block metal:use-macro="here/field_render/macros/field_render"/>\n
</tal:block>\n
</table>\n
</td>\n
</tr>\n
</table>\n
</tal:block>\n
<tal:block tal:condition="python: \'bottom\' in groups[row[0]]">\n
<tal:block tal:repeat="cell row">\n
<tal:block tal:repeat="field python:form.get_fields_in_group(groups[cell])">\n
<tal:block tal:define="value python:request.get(field.id, None)"\n
tal:replace="structure python:field.render(value, request)" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
......
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