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 @@ ...@@ -76,8 +76,9 @@
tal:condition="python: layout_form_id and not ignore_layout">\n 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 <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 <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:block tal:repeat="field python:form.get_fields_in_group(group)">\n
tal:replace="structure python: field.render(None, request)"/>\n <tal:block tal:replace="structure python: field.render(None, request)"/>\n
</tal:block>\n
</div>\n </div>\n
</tal:block>\n </tal:block>\n
<tal:block tal:condition="editable_mode" tal:repeat="group python: form.get_groups()">\n <tal:block tal:condition="editable_mode" tal:repeat="group python: form.get_groups()">\n
...@@ -101,15 +102,19 @@ ...@@ -101,15 +102,19 @@
<tal:block tal:define="groups python: form.get_groups();\n <tal:block tal:define="groups python: form.get_groups();\n
rows python:[];">\n rows python:[];">\n
<tal:block tal:repeat="group groups">\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 len(rows)==0">\n
<tal:block tal:define="dummy python: rows.append([])"/>\n <tal:block tal:define="dummy python: rows.append([])"/>\n
</tal:block>\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 tal:define="dummy python: rows[-1].append(repeat[\'group\'].index)"/>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
<tal:block tal:repeat="row rows">\n <tal:block tal:repeat="row rows">\n
<tal:block tal:condition="python: len(row)>0">\n
<tal:block tal:condition="python: \'bottom\' not in groups[row[0]]">\n <tal:block tal:condition="python: \'bottom\' not in groups[row[0]]">\n
<table width="100%" class="Border">\n <table width="100%" class="Border">\n
<tr>\n <tr>\n
...@@ -133,6 +138,7 @@ ...@@ -133,6 +138,7 @@
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block>\n
</div>\n </div>\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