Commit cbf2871a authored by Kevin Deldycke's avatar Kevin Deldycke

Factorize common page template header.

Re-sync erp5_web template header with xhtml_style one.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10264 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cc29446c
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block tal:replace="nothing"\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
* Note: If this template is not working, look at erp5_xhtml_style/template_erp5_xhtml_style\n
which is the equivalent of this erp5_web_default_template page template in default\n
erp5 xhtml style.\n
* XXX Is it a good idea to merge this header with th one in template_erp5_xhtml_style ?\n
--></tal:block>\n
\n
<tal:block metal:define-macro="master">\n
\n
<tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/>\n
\n
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n
\n
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n
<head tal:define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\')">\n
<base tal:attributes="href python: \'%s/\' % here.getWebSiteValue().absolute_url()"/>\n
<meta name="generator" content="ERP5"/>\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\n
<title tal:content="python: \'%s | %s\' % (here.getTitleOrId(), here.getPortalObject().getTitle() or here.getPortalObject().getId())"/>\n
\n
<!-- erp5_web_form.css is a constant among erp5 web themes -->\n
<link rel="stylesheet" type="text/css" media="screen" href="erp5_web_form.css"/>\n
\n
<tal:block tal:repeat="css css_list">\n
<link tal:attributes="href css" type="text/css" rel="stylesheet"/>\n
</tal:block>\n
\n
<tal:block tal:repeat="js js_list">\n
<script tal:attributes="src js" type="text/javascript"></script>\n
</tal:block>\n
\n
<!-- TODO: No local JS and/or CSS file support yet: they should be registered via\n
generic mechanism and put in css_list and js_list above. -->\n
<tal:block metal:define-slot="erp5_web_template_head"/>\n
\n
<tal:block metal:use-macro="here/global_definitions/macros/planning_box_definitions"/>\n
</head>\n
\n
<body>\n
<!-- Global form is used to save data of other fields when we edit one another (generally make sense in listbox and/or relation string field) -->\n
<form id="main_form"\n
tal:attributes="enctype python: here.ERP5XhtmlStyle_getFormEnctype(form);\n
action url;\n
method form/method | string:post">\n
\n
<tal:block metal:use-macro="here/global_definitions/macros/http_definitions"/>\n
\n
<!-- Main content rendering -->\n
<tal:block metal:define-slot="erp5_web_template_main_content"/>\n
\n
</form>\n
</body>\n
</html>\n
</tal:block>
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_web_template_header</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -48,80 +48,43 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<tal:block tal:replace="nothing"\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
* Note: If this template is not working, look at erp5_xhtml_style/template_erp5_xhtml_style\n
which is the equivalent of this erp5_web_default_template page template in default\n
erp5 xhtml style.\n
--></tal:block>\n
\n
<tal:block metal:define-macro="master">\n
<tal:block metal:use-macro="here/erp5_web_template_header/macros/master">\n
\n
<tal:block metal:use-macro="here/global_definitions/macros/header_definitions"/>\n
\n
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n
<tal:block metal:fill-slot="erp5_web_template_head">\n
<link rel="stylesheet" type="text/css" media="screen" href="erp5_web_default_theme.css"/>\n
</tal:block>\n
\n
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n
<head tal:define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\')">\n
<meta name="generator" content="ERP5"/>\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\n
<title tal:content="python: \'%s | %s\' % (here.getTitleOrId(), here.getPortalObject().getTitle() or here.getPortalObject().getId())"/>\n
\n
<!-- erp5_web_form.css is a constant among erp5 web themes -->\n
<link rel="stylesheet" type="text/css" media="screen" href="erp5_web_form.css"/>\n
<!-- TODO: erp5_web_default_theme.css should be registered via generic mechanism -->\n
<link rel="stylesheet" type="text/css" media="screen" href="erp5_web_default_theme.css"/>\n
<tal:block tal:repeat="css css_list">\n
<link tal:attributes="href css" type="text/css" rel="stylesheet"/>\n
</tal:block>\n
<tal:block metal:fill-slot="erp5_web_template_main_content">\n
\n
<tal:block tal:repeat="js js_list">\n
<script tal:attributes="src js" type="text/javascript"></script>\n
<div id="main_content" class="column">\n
<tal:block tal:condition="here/REQUEST/portal_status_message | nothing">\n
<!-- XXX Why no portal message displayed there ?\n
Normally a message should be displayed when saving an object through web interface... -->\n
<div tal:content="structure here/REQUEST/portal_status_message | nothing" id="transition_message"/>\n
</tal:block>\n
<tal:block metal:define-slot="main"/>\n
</div>\n
\n
<tal:block metal:use-macro="here/global_definitions/macros/planning_box_definitions"/>\n
</head>\n
\n
<body>\n
<!-- Global form is used to save data of other fields when we edit one another (generally make sense in listbox and/or relation string field) -->\n
<form id="main_form"\n
tal:attributes="enctype form/enctype | nothing;\n
action url;\n
method form/method | string:post">\n
\n
<tal:block metal:use-macro="here/global_definitions/macros/http_definitions"/>\n
\n
<!-- Main content rendering -->\n
<div id="main_content" class="column">\n
<tal:block tal:condition="here/REQUEST/portal_status_message | nothing">\n
<!-- XXX Why no portal message displayed there ?\n
Normally a message should be displayed when saving an object through web interface... -->\n
<div tal:content="structure here/REQUEST/portal_status_message | nothing" id="transition_message"/>\n
</tal:block>\n
<tal:block metal:define-slot="main"/>\n
</div>\n
<!-- Layout form rendering -->\n
<tal:block tal:condition="python: layout_form is not None"\n
tal:define="field_errors python: request.get(\'field_errors\', {});\n
dummy python: request.set(\'editable_mode\', 1)">\n
\n
<!-- Layout form rendering -->\n
<tal:block tal:condition="python: layout_form is not None"\n
tal:define="field_errors python: request.get(\'field_errors\', {});\n
dummy python: request.set(\'editable_mode\', 1)">\n
\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form"/>\n
</tal:block>\n
\n
<tal:block tal:repeat="aggregate python: layout_form.WebSite_getGroupList([\'header\', \'left\', \'right\', \'footer\'])">\n
<tal:block metal:use-macro="here/erp5_web_macros/macros/render_aggregate"/>\n
</tal:block>\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/form"/>\n
</tal:block>\n
\n
</tal:block>\n
<tal:block tal:repeat="aggregate python: layout_form.WebSite_getGroupList([\'header\', \'left\', \'right\', \'footer\'])">\n
<tal:block metal:use-macro="here/erp5_web_macros/macros/render_aggregate"/>\n
</tal:block>\n
\n
</form>\n
</body>\n
</tal:block>\n
\n
</html>\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></string> </value>
......
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