Commit cef64923 authored by Vincent Pelletier's avatar Vincent Pelletier

Add layout support.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6019 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b822145
......@@ -15,7 +15,16 @@
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
<dictionary>
<item>
<key> <string>yo</string> </key>
<value>
<list>
<string>Owner</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
......@@ -48,68 +57,47 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n
"DTD/xhtml1-strict.dtd">\n
<tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
editable_mode request/editable_mode | nothing;\n
global ignore_layout request/ignore_layout | nothing;\n
global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
layout_id layout_form/pt | string:list_master">\n
<tal:block tal:condition="python: not layout_form_id or ignore_layout">\n
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">\n
<?xml-stylesheet href="erp5.css" rel="stylesheet" type="text/css"?>\n
\n
<span tal:replace="nothing">\n
<!--\n
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.\n
Thierry Faucher <tf@nexedi.com>\n
\n
This program is Free Software; you can redistribute it and/or\n
modify it under the terms of the GNU General Public License\n
as published by the Free Software Foundation; either version 2\n
of the License, or (at your option) any later version.\n
\n
This program is distributed in the hope that it will be useful,\n
but WITHOUT ANY WARRANTY; without even the implied warranty of\n
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n
GNU General Public License for more details.\n
\n
You should have received a copy of the GNU General Public License\n
along with this program; if not, write to the Free Software\n
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n
</span>\n
\n
</tal:block>\n
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"\n
xml:lang="en"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
metal:use-macro="here/list_master/macros/master">\n
\n
metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<head tal:define="dummy python:request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\')">\n
<meta name="description" content="Generated by form_list" />\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n
<title tal:content="template/title_or_id" i18n:translate="" i18n:domain="ui">The title</title>\n
<title tal:content="template/title_or_id" i18n:translate="" i18n:domain="ui"></title>\n
<link href="erp5.css" rel="stylesheet" type="text/css"/>\n
</head>\n
\n
<body><div metal:fill-slot="main">\n
<body>\n
<div metal:fill-slot="main">\n
<div class="Main">\n
\n
\n
<span tal:define="groups python: form.get_groups(include_empty=1);\n
field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\',here)">\n
\n
\n
<span tal:condition="python: len(groups)>0">\n
<span tal:repeat="field python:form.get_fields_in_group(groups[0])">\n
<div class="FormDescription" tal:content="python:field.get_value(\'description\')"></div>\n
<span tal:define="value python:request.get(field.id,None)"\n
tal:replace="structure python:field.render(value,request)" />\n
</span>\n
</span>\n
\n
\n
</span>\n
</div>\n
</div>\n
</body>\n
</html>\n
</tal:block>
]]></string> </value>
</item>
......@@ -125,6 +113,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<key> <string>id</string> </key>
<value> <string>form_list</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
......
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