From 32bffc3ff9a059adc6069cfc1b25032e5104781d Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Fri, 13 Oct 2006 08:55:48 +0000 Subject: [PATCH] Move http response charset setting to global definitions. Add some variables which will be used in a future commit. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10685 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_xhtml_style/global_definitions.xml | 14 +++++++++----- .../erp5_xhtml_style/template_erp5_xhtml_style.xml | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml index 6858a0d4c8..e8000818be 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml @@ -50,6 +50,7 @@ <tal:block metal:define-macro="header_definitions">\n <tal:block tal:define="\n + global portal_path here/portal_url/getPortalPath;\n cancel_url request/cancel_url | request/ACTUAL_URL;\n local_parameter_list local_parameter_list | python: {};\n dummy python: local_parameter_list.update({\'cancel_url\': cancel_url});\n @@ -60,21 +61,24 @@ global current_url python: \'%s/%s\' % (url, current_form_id);\n global current_action python: here.ERP5XhtmlStyle_getCurrentAction(current_url, actions);\n \n + dummy python: request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\');\n dummy python: request.set(\'here\', here);\n \n global css_list css_list | python: [];\n - dummy python: not is_web_mode and css_list.extend([\'%s/%s\' % (here.portal_url.getPortalPath(), x) for x in here.ERP5XhtmlStyle_getCSSList()]);\n + dummy python: css_list.append(\'%s/erp5.css\' % (portal_path, ));\n global js_list js_list | python: [];\n - dummy python: js_list.extend([\'%s/%s\' % (here.portal_url.getPortalPath(), x) for x in here.ERP5XhtmlStyle_getJSList()]);\n + dummy python: js_list.append(\'%s/erp5.js\' % (portal_path, ));\n \n global http_parameter_list python: here.ERP5XhtmlStyle_filterParameterList(request.form);\n dummy python: http_parameter_list.update(local_parameter_list);\n global http_parameters python: here.ERP5XhtmlStyle_renderHTTPParameterList(http_parameter_list);\n global form nocall:form | nothing;\n - global preferred_html_style_developper_mode here/portal_preferences/getPreferredHtmlStyleDevelopperMode;\n - global preferred_html_style_translator_mode here/portal_preferences/getPreferredHtmlStyleTranslatorMode;\n + portal_preferences python: here.getPortalObject().portal_preferences;\n + global preferred_html_style_developper_mode portal_preferences/getPreferredHtmlStyleDevelopperMode;\n + global preferred_html_style_translator_mode portal_preferences/getPreferredHtmlStyleTranslatorMode;\n + global preferred_html_style_contextual_help portal_preferences/getPreferredHtmlStyleContextualHelp;\n + global developper_shortcut_render python: (preferred_html_style_developper_mode or preferred_html_style_translator_mode) and here.developper_shortcut_render;\n global selected_language here/Localizer/get_selected_language;\n - global portal_path here/portal_url/getPortalPath;\n "/>\n </tal:block>\n \n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml index 0016ca8cdf..7c825954a9 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml @@ -83,7 +83,7 @@ IDEAS:\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 + <head>\n <base tal:attributes="href python: \'%s/\' % (url, )"/>\n <meta name="generator" content="ERP5"/>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>\n -- 2.30.9