Commit e8b053d4 authored by Vincent Pelletier's avatar Vincent Pelletier

Added layout support.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6294 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7949cedf
......@@ -48,6 +48,26 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<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
<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
......
......@@ -48,11 +48,7 @@
<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
<?xml-stylesheet href="erp5.css" rel="stylesheet" type="text/css"?>\n
\n
<span tal:replace="nothing">\n
<tal:block tal:replace=\'nothing\'>\n
<!--\n
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.\n
Thierry Faucher <tf@nexedi.com>\n
......@@ -71,30 +67,18 @@ 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
<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/view_dialog_master/macros/master">\n
\n
<head tal:define="dummy python:request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\')">\n
<meta name="description" content="Generated by form_view_dialog" />\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n
<title tal:content="template/title_or_id"\n
i18n:translate="" i18n:domain="ui">\n
The title\n
</title>\n
<link href="erp5.css" rel="stylesheet" type="text/css" />\n
</head>\n
\n
<body><div metal:fill-slot="main">\n
</tal:block>\n
<tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode python:1;\n
dummy python:request.set(\'editable_mode\', editable_mode);\n
global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
default_layout string:view_dialog_master;\n
layout_id layout_form/pt | default_layout;">\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
<div class="Search">\n
\n
\n
<span tal:define="groups python: form.get_groups(include_empty=1);\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
<table class="Border" width="100%" tal:condition="python:len(form.get_fields_in_group(groups[0])) > 0\n
......@@ -115,14 +99,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<option value="1" tal:content="action/name"\n
tal:condition="python: action[\'url\'].find(form.id) < 0"\n
i18n:translate="" i18n:domain="ui"\n
tal:attributes="value action/url">Saut</option>\n
tal:attributes="value action/url"></option>\n
<option value="1" tal:content="action/name"\n
tal:condition="python: action[\'url\'].find(form.id) >= 0"\n
i18n:translate="" i18n:domain="ui"\n
tal:attributes="value action/url"\n
selected>Saut</option>\n
selected></option>\n
</span>\n
</select></td>\n
</select>\n
</td>\n
<td valign="bottom" align="left" nowrap> &nbsp;\n
<input type="image" src="/images/erp5_html_style/images/exec16.png" title="Action"\n
i18n:attributes="title" i18n:domain="ui"\n
......@@ -133,7 +118,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</td>\n
<td valign="top" tal:condition="python: len(groups)>1"></td>\n
</tr>\n
<tr><td valign="top">\n
<tr>\n
<td valign="top">\n
<table>\n
<span tal:repeat="field python:form.get_fields_in_group(groups[0])">\n
<tr>\n
......@@ -146,8 +132,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<td tal:content="structure field/title"\n
tal:condition="python: (not field_errors.has_key(field.id))\n
and not field.is_required()"\n
i18n:translate="" i18n:domain="ui"\n
>\n
i18n:translate="" i18n:domain="ui">\n
</td>\n
<td tal:content="structure field/title"\n
tal:condition="python: field_errors.has_key(field.id)\n
......@@ -220,7 +205,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</table>\n
</td></tr>\n
</table>\n
\n
<table class="Border" tal:condition="python: len(groups)>2 and\n
len(form.get_fields_in_group(groups[2])) > 0">\n
<td>\n
......@@ -267,22 +251,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</table>\n
</td>\n
</table>\n
\n
<span tal:condition="python: len(groups)>3">\n
<span tal:repeat="field python:form.get_fields_in_group(groups[3])">\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
\n
</div>\n
</span>\n
</div>\n
</body>\n
</html>\n
<!-- <pre tal:content="context/REQUEST/text"></pre>-->\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></string> </value>
</item>
......
......@@ -65,36 +65,34 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
metal:use-macro="here/main_template/macros/master">\n
<body>\n
<div metal:fill-slot="main" i18n:domain="ui">\n
<div class="Desktop">\n
<span tal:condition="python: request.get(\'came_from\', None) is not None">\n
<tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
layout_id layout_form/pt | string:main_template;"\n
i18n:domain="ui">\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
<div class="Desktop">\n
<span tal:condition="python: request.get(\'came_from\', None) is not None">\n
<h1 class="Desktop" i18n:translate="">You don\'t have enough permissions to access this page</h1>\n
<span i18n:translate=""> You can log in with another user name or \n
</span>\n
<a href="javascript:history.back();" \n
i18n:translate="">go back.</a>\n
<span i18n:translate="">You can log in with another user name or</span>\n
<a href="javascript:history.back();" i18n:translate="">go back.</a>\n
<br/> <br/>\n
</span>\n
<span tal:condition="python: request.get(\'came_from\', None) is None">\n
</span>\n
<span tal:condition="python: request.get(\'came_from\', None) is None">\n
<h1 class="Desktop" i18n:translate="">Log in</h1>\n
</span>\n
</span>\n
<!-- <form action="" method="post"\n
tal:attributes="action string:${here/portal_url}/logged_in"\n
>\n
-->\n
tal:attributes="action string:${here/portal_url}/logged_in">-->\n
<!-- ****** Enable the automatic redirect ***** -->\n
<span tal:condition="exists: request/came_from">\n
<span tal:condition="exists: request/came_from">\n
<input type="hidden" name="came_from" value=""\n
tal:attributes="value request/came_from" />\n
</span>\n
</span>\n
<!-- ****** Enable the automatic redirect ***** -->\n
\n
<table class="FormLayout">\n
<tr>\n
<table class="FormLayout">\n
<tr>\n
<td align="left" valign="top">\n
<strong i18n:translate="">Name</strong>\n
</td>\n
......@@ -103,58 +101,41 @@
tal:attributes="value python: request.get(\'__ac_name\') or \'\'" />\n
<script>setFocus("__ac_name");</script>\n
</td>\n
</tr>\n
<tr>\n
</tr>\n
<tr>\n
<td align="left" valign="top">\n
<strong i18n:translate="">Password</strong>\n
</td>\n
<td align="left" valign="top">\n
<input type="password" name="__ac_password" size="20" />\n
</td>\n
</tr>\n
\n
<tr valign="top" align="left">\n
<td></td>\n
<td><input type="checkbox" name="__ac_persistent" value="1" checked\n
</tr>\n
<tr valign="top" align="left">\n
<td></td>\n
<td>\n
<input type="checkbox" name="__ac_persistent" value="1" checked\n
id="cb_remember" />\n
<label for="cb_remember" i18n:translate="">Remember my name.</label>\n
</td></tr>\n
\n
<tr>\n
<td align="left" valign="top">\n
<label for="cb_remember" i18n:translate="">Remember my name.</label>\n
</td>\n
</tr>\n
<tr>\n
<td align="left" valign="top"></td>\n
<td align="left" valign="top">\n
<input type="submit" name="submit" value=" Login "\n
i18n:attributes="value" />\n
</td>\n
</tr>\n
\n
</table>\n
\n
</tr>\n
</table>\n
<!-- </form> -->\n
\n
<p><a href=""\n
tal:attributes="href string:${here/portal_url}/mail_password_form"\n
i18n:translate=""\n
>I forgot my password!</a>\n
</p>\n
\n
<p i18n:translate="">Having trouble logging in? Make sure to enable cookies in\n
your web browser.\n
</p>\n
\n
<p i18n:translate="">Don\'t forget to logout or exit your browser when you\'re\n
done.\n
</p>\n
\n
<p i18n:translate="">Setting the \'Remember my name\' option will set a cookie\n
with your username, so that when you next log in, your user name will\n
already be filled in for you.\n
</p>\n
</div>\n
</div>\n
</body>\n
</html>\n
<p><a tal:attributes="href string:${here/portal_url}/mail_password_form"\n
i18n:translate="">I forgot my password!</a></p>\n
<p i18n:translate="">Having trouble logging in? Make sure to enable cookies in your web browser.</p>\n
<p i18n:translate="">Don\'t forget to logout or exit your browser when you\'re done.</p>\n
<p i18n:translate="">Setting the \'Remember my name\' option will set a cookie with your username, so that when you next log in, your user name will already be filled in for you.</p>\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
]]></string> </value>
......
......@@ -48,11 +48,6 @@
<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
<?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
Jean-Paul Smets <jp@nexedi.com>\n
......@@ -72,33 +67,21 @@ 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
<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/view_master/macros/master">\n
\n
<head tal:define="dummy python:request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\')">\n
<meta name="description" content="Generated by report_view" />\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n
<title tal:content="template/title_or_id"\n
i18n:translate="" i18n:domain="ui">\n
The title\n
</title>\n
<link href="erp5.css" rel="stylesheet" type="text/css" />\n
</head>\n
\n
<body><div metal:fill-slot="main"> \n
<tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
default_layout string:view_master;\n
layout_id layout_form/pt | default_layout;">\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
<div class="Main">\n
\n
<span tal:define="groups python: form.get_groups(include_empty=1);\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
<table class="Border" width="100%" tal:condition="python:len(form.get_fields_in_group(groups[0])) > 0\n
or len(form.get_fields_in_group(groups[1])) > 0">\n
<tr>\n
<td valign="top">\n
<table>\n
<span tal:repeat="field python:form.get_fields_in_group(groups[0])">\n
......@@ -112,8 +95,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<td tal:content="structure field/title"\n
tal:condition="python: (not field_errors.has_key(field.id))\n
and not field.is_required()"\n
i18n:translate="" i18n:domain="ui"\n
>\n
i18n:translate="" i18n:domain="ui">\n
</td>\n
<td tal:content="structure field/title"\n
tal:condition="python: field_errors.has_key(field.id)\n
......@@ -155,8 +137,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<td tal:content="structure field/title"\n
tal:condition="python: (not field_errors.has_key(field.id))\n
and not field.is_required()"\n
i18n:translate="" i18n:domain="ui"\n
>\n
i18n:translate="" i18n:domain="ui">\n
</td>\n
<td tal:content="structure field/title"\n
tal:condition="python: field_errors.has_key(field.id)\n
......@@ -171,7 +152,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
class="required">\n
</td>\n
<td tal:define="value python:request.get(field.id,None)">\n
<span tal:replace="structure python:field.render(value,request)" />\n
<tal:block tal:replace="structure python:field.render(value,request)" />\n
</td>\n
</tr>\n
<tr tal:condition="python: field_errors.has_key(field.id)">\n
......@@ -185,8 +166,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</span>\n
</table>\n
</td>\n
</tr>\n
</table>\n
\n
<span tal:condition="python: len(groups)>2">\n
<table class="Border" tal:condition="python:len(form.get_fields_in_group(groups[2])) > 0">\n
<td>\n
......@@ -202,8 +183,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<td tal:content="structure field/title"\n
tal:condition="python: (not field_errors.has_key(field.id))\n
and not field.is_required()"\n
i18n:translate="" i18n:domain="ui"\n
>\n
i18n:translate="" i18n:domain="ui">\n
</td>\n
<td tal:content="structure field/title"\n
tal:condition="python: field_errors.has_key(field.id)\n
......@@ -218,7 +198,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
class="required">\n
</td>\n
<td tal:define="value python:request.get(field.id,None)">\n
<span tal:replace="structure python:field.render(value,request)"/>\n
<tal:block tal:replace="structure python:field.render(value,request)"/>\n
</td>\n
</tr>\n
<tr tal:condition="python: field_errors.has_key(field.id)">\n
......@@ -232,22 +212,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</td>\n
</table>\n
</span>\n
\n
<span tal:condition="python: len(groups)>3">\n
<span tal:repeat="field python:form.get_fields_in_group(groups[3])">\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
\n
<tal:block tal:define="portal_object here/portal_url/getPortalObject">\n
<tal:block tal:repeat="report_item python:report_method()">\n
</span>\n
<tal:block tal:define="portal_object here/portal_url/getPortalObject">\n
<tal:block tal:repeat="report_item python:report_method()">\n
<tal:block tal:define="here python:report_item.getObject(portal_object);\n
dummy python:report_item.pushReport(portal_object)">\n
\n
<tal:block tal:condition="report_item/getFormId">\n
<tal:block tal:define="form python:getattr(here,report_item.getFormId())" >\n
<tal:block tal:condition="python:form.pt == \'form_view\'">\n
......@@ -258,21 +233,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
<tal:block tal:define="dummy python:report_item.popReport(portal_object)"/>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
\n
\n
\n
\n
\n
</div>\n
</tal:block>\n
</tal:block>\n
</div>\n
</body>\n
</html>\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></string> </value>
</item>
......
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