From 16a001394a2430d138c5f1470ebe4ade381974f8 Mon Sep 17 00:00:00 2001 From: Gabriel Monnerat <gabriel@tiolive.com> Date: Mon, 14 Mar 2011 19:49:44 +0000 Subject: [PATCH] create macro to remove code duplicated git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44264 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ung_zuite/testGadgetInUNGDocs.xml | 4 +- .../portal_tests/ung_zuite/testUNGLogin.xml | 6 +- .../ung_zuite/testUNGSettings.xml | 4 +- .../Zuite_CommonTemplateForUNG.xml | 76 +++++++++++++++++++ bt5/erp5_web_ung_ui_test/bt/revision | 2 +- 5 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/Zuite_CommonTemplateForUNG.xml diff --git a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testGadgetInUNGDocs.xml b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testGadgetInUNGDocs.xml index 8cd8c717bb..bd0f8e9318 100644 --- a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testGadgetInUNGDocs.xml +++ b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testGadgetInUNGDocs.xml @@ -47,7 +47,7 @@ <thead>\n <tr><td rowspan="1" colspan="3" tal:content="template/getId"/></tr>\n </thead><tbody>\n - <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n + <tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/init" />\n <tr>\n <td>openAndWait</td>\n <td>${base_url}/ERP5Site_cleanUpUNGKnowledgePadList</td>\n @@ -55,7 +55,7 @@ </tr>\n <tr>\n <td>openAndWait</td>\n - <td>${base_url}/web_site_module/ung/WebSite_logout</td>\n + <td>${ung_url}/WebSite_logout</td>\n <td></td>\n </tr>\n <tr>\n diff --git a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGLogin.xml b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGLogin.xml index 04b818cebf..c31fa90465 100644 --- a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGLogin.xml +++ b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGLogin.xml @@ -47,10 +47,10 @@ <thead>\n <tr><td rowspan="1" colspan="3" tal:content="template/getId"/></tr>\n </thead><tbody>\n - <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n + <tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/init" />\n <tr>\n <td>openAndWait</td>\n - <td>${base_url}/web_site_module/ung/WebSite_logout</td>\n + <td>${ung_url}/WebSite_logout</td>\n <td></td>\n </tr>\n <tr>\n @@ -95,7 +95,7 @@ </tr>\n <tr>\n <td>clickAndWait</td>\n - <td>//a[@href="${base_url}/web_site_module/ung/WebSite_logout"]</td>\n + <td>//a[@href="${ung_url}/WebSite_logout"]</td>\n <td></td>\n </tr>\n <tr>\n diff --git a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGSettings.xml b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGSettings.xml index 7a574a8a9f..182fe23107 100644 --- a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGSettings.xml +++ b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGSettings.xml @@ -47,10 +47,10 @@ <thead>\n <tr><td rowspan="1" colspan="3" tal:content="template/getId"/></tr>\n </thead><tbody>\n - <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n + <tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/init" />\n <tr>\n <td>openAndWait</td>\n - <td>${base_url}/web_site_module/ung/WebSite_logout</td>\n + <td>${ung_url}/WebSite_logout</td>\n <td></td>\n </tr>\n <tr>\n diff --git a/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/Zuite_CommonTemplateForUNG.xml b/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/Zuite_CommonTemplateForUNG.xml new file mode 100644 index 0000000000..f2fbdb5088 --- /dev/null +++ b/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/Zuite_CommonTemplateForUNG.xml @@ -0,0 +1,76 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> + </pickle> + <pickle> + <dictionary> + <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>_text</string> </key> + <value> <unicode encoding="cdata"><![CDATA[ + +<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n + xmlns:metal="http://xml.zope.org/namespaces/metal">\n + <tal:block metal:define-macro="init">\n + <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n + <tr>\n + <td>store</td>\n + <td>${base_url}/web_site_module/ung</td>\n + <td>ung_url</td>\n + </tr>\n + </tal:block>\n +</tal:block> + +]]></unicode> </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>Zuite_CommonTemplateForUNG</string> </value> + </item> + <item> + <key> <string>output_encoding</string> </key> + <value> <string>utf-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <unicode></unicode> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web_ung_ui_test/bt/revision b/bt5/erp5_web_ung_ui_test/bt/revision index d8263ee986..e440e5c842 100644 --- a/bt5/erp5_web_ung_ui_test/bt/revision +++ b/bt5/erp5_web_ung_ui_test/bt/revision @@ -1 +1 @@ -2 \ No newline at end of file +3 \ No newline at end of file -- 2.30.9