From 4cf50052e34df47de4b462e6f78da6bee12cd5fa Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Tue, 18 Dec 2007 01:43:38 +0000 Subject: [PATCH] 2007-12-18 yo * Acquire skins and tools from a portal, whenever possible. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18374 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_xhtml_style/context_box_render.xml | 27 ++++++++++--------- .../erp5_xhtml_style/index_html.xml | 13 +++++---- .../erp5_xhtml_style/logged_in.xml | 9 ++++--- .../template_erp5_xhtml_style.xml | 17 +++++++----- .../erp5_xhtml_style/view_main.xml | 12 ++++++--- .../bootstrap/erp5_xhtml_style/bt/change_log | 3 +++ .../bootstrap/erp5_xhtml_style/bt/revision | 2 +- 7 files changed, 51 insertions(+), 32 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml index 8593858861..6910ff2f38 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> - <tuple/> + <tuple> + <string>Products.PageTemplates.ZopePageTemplate</string> + <string>ZopePageTemplate</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -65,7 +68,7 @@ tal:content="jump/name" i18n:translate="" i18n:domain="ui" />\n </tal:block>\n <tal:block tal:condition="preferred_html_style_developper_mode">\n - <tal:block tal:condition="python: here.getPortalTypeName() in here.portal_types.objectIds() and here.portal_types.getTypeInfo(here).Base_getSourceVisibility()">\n + <tal:block tal:condition="python: here.getPortalTypeName() in portal.portal_types.objectIds() and portal.portal_types.getTypeInfo(here).Base_getSourceVisibility()">\n <option value="1" disabled="disabled" i18n:translate="" i18n:domain="ui">-- Developper Mode --</option>\n <option tal:attributes="value python: \'%s/manage_workspace\' % (here.portal_types.getTypeInfo(here).absolute_url(),)"\n i18n:translate="" i18n:domain="ui">\n @@ -73,9 +76,9 @@ i18n:name="portal_type" i18n:translate="" i18n:domain="ui" />\'\n </option>\n </tal:block>\n - <tal:block tal:condition="here/portal_workflow/Base_getSourceVisibility">\n + <tal:block tal:condition="portal/portal_workflow/Base_getSourceVisibility">\n <option value="1" disabled="disabled" i18n:translate="" i18n:domain="ui">-- Workflows --</option>\n - <tal:block tal:repeat="workflow python: here.portal_workflow.getWorkflowsFor(here)">\n + <tal:block tal:repeat="workflow python: portal.portal_workflow.getWorkflowsFor(here)">\n <option tal:attributes="value python: \'%s/manage_properties\' % (workflow.absolute_url(), )" tal:content="workflow/title" />\n </tal:block>\n </tal:block>\n @@ -245,7 +248,7 @@ <tal:block tal:condition="list_mode">\n <span class="separator"></span>\n <a tal:condition="search_actions" class="find" title="Find"\n - tal:attributes="href python: here.ERP5Site_renderCustomLink(search_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_search\')"\n + tal:attributes="href python: portal.ERP5Site_renderCustomLink(search_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_search\')"\n i18n:attributes="title" i18n:domain="ui">\n <span class="image"></span>\n <span class="description" i18n:translate="" i18n:domain="ui">Find</span>\n @@ -262,7 +265,7 @@ <span class="description" i18n:translate="" i18n:domain="ui">Filter</span>\n </button>\n <a tal:condition="sort_actions" class="sort" title="Sort"\n - tal:attributes="href python: here.ERP5Site_renderCustomLink(sort_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_sort\')"\n + tal:attributes="href python: portal.ERP5Site_renderCustomLink(sort_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_sort\')"\n i18n:attributes="title" i18n:domain="ui">\n <span class="image"></span>\n <span class="description" i18n:translate="" i18n:domain="ui">Sort</span>\n @@ -271,13 +274,13 @@ <span tal:condition="exchange_actions | report_actions"\n class="separator"></span>\n <a tal:condition="exchange_actions" class="import_export" title="Import / Export"\n - tal:attributes="href python: here.ERP5Site_renderCustomLink(exchange_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_exchange\')"\n + tal:attributes="href python: portal.ERP5Site_renderCustomLink(exchange_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_exchange\')"\n i18n:attributes="title" i18n:domain="ui">\n <span class="image"></span>\n <span class="description" i18n:translate="" i18n:domain="ui">Import / Export</span>\n </a>\n <a tal:condition="report_actions" class="report" title="Report"\n - tal:attributes="href python: here.ERP5Site_renderCustomLink(report_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_report\')"\n + tal:attributes="href python: portal.ERP5Site_renderCustomLink(report_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_report\')"\n i18n:attributes="title" i18n:domain="ui">\n <span class="image"></span>\n <span class="description" i18n:translate="" i18n:domain="ui">Report</span>\n @@ -297,7 +300,7 @@ <tal:block tal:condition="ui_actions">\n <span class="separator"></span>\n <a class="configure" title="Configure"\n - tal:attributes="href python: here.ERP5Site_renderCustomLink(ui_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_ui\')"\n + tal:attributes="href python: portal.ERP5Site_renderCustomLink(ui_actions[0][\'url\'], http_parameter_list, dialog_category=\'object_ui\')"\n i18n:attributes="title" i18n:domain="ui">\n <span class="image"></span>\n <span class="description" i18n:translate="" i18n:domain="ui">Configure</span>\n @@ -309,7 +312,7 @@ <span class="second">\n <a tal:condition="preferred_html_style_contextual_help"\n class="jump_help" title="Help"\n - tal:attributes="href python: here.ERP5Site_getHelpUrl(current_action=current_action, current_form_id=current_form_id, workflow_action=request.get(\'workflow_action\'))"\n + tal:attributes="href python: portal.ERP5Site_getHelpUrl(current_action=current_action, current_form_id=current_form_id, workflow_action=request.get(\'workflow_action\'))"\n i18n:attributes="title" i18n:domain="ui">\n <span class="image"></span>\n <span class="description" i18n:translate="" i18n:domain="ui">Help</span>\n @@ -322,7 +325,7 @@ </a>\n <a tal:condition="here/hasActivity | nothing" class="activity_pending"\n title="Activity Pending"\n - tal:attributes="href python: here.portal_membership.checkPermission(\'View management screens\', here.portal_activities) and \'%s%s/manageActivities\' % (here.REQUEST[\'SERVER_URL\'],here.portal_activities.getUrl(), ) or \'#\'"\n + tal:attributes="href python: portal.portal_membership.checkPermission(\'View management screens\', portal.portal_activities) and \'%s%s/manageActivities\' % (here.REQUEST[\'SERVER_URL\'],portal.portal_activities.getUrl(), ) or \'#\'"\n i18n:attributes="title" i18n:domain="ui">\n <span class="image"></span>\n <span class="description" i18n:translate="" i18n:domain="ui">Activity Pending</span>\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/index_html.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/index_html.xml index 8baddfac30..d1b6a43998 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/index_html.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/index_html.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> - <tuple/> + <tuple> + <string>Products.PageTemplates.ZopePageTemplate</string> + <string>ZopePageTemplate</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -51,14 +54,14 @@ <tal:block tal:define="title here/Title">\n <tal:block metal:use-macro="here/main_template/macros/master">\n <tal:block metal:fill-slot="main">\n - <tal:block tal:condition="here/portal_membership/isAnonymousUser">\n + <tal:block tal:condition="portal/portal_membership/isAnonymousUser">\n <tal:block tal:define="dummy python: request.RESPONSE.redirect(\'%s/login_form\' % url)" />\n </tal:block>\n - <div tal:condition="python: not here.portal_membership.isAnonymousUser()"\n + <div tal:condition="python: not portal.portal_membership.isAnonymousUser()"\n class="index_html">\n <h2 i18n:translate="" i18n:domain="ui">Welcome to ERP5</h2>\n <table border="1">\n - <tr tal:define="module_list here/ERP5Site_getModuleItemList;\n + <tr tal:define="module_list portal/ERP5Site_getModuleItemList;\n module_len python: len(module_list);\n col_size python: 12;\n col_len python: module_len % col_size and (module_len + col_size) / col_size or (module_len) / col_size">\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml index a49c496a81..1600307069 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> - <tuple/> + <tuple> + <string>Products.PageTemplates.ZopePageTemplate</string> + <string>ZopePageTemplate</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -57,7 +60,7 @@ <tal:block tal:condition="here/portal_skins/updateSkinCookie | nothing"\n tal:define="dummy here/setupCurrentSkin;" />\n <tal:block tal:define="response request/RESPONSE;\n - mtool here/portal_membership;\n + mtool portal/portal_membership;\n isAnon mtool/isAnonymousUser|nothing;">\n <tal:block tal:condition="isAnon">\n <tal:block tal:define="dummy python: response.expireCookie(\'__ac\', path=\'/\');\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 1e9c09263e..da39c83f98 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 @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> - <tuple/> + <tuple> + <string>Products.PageTemplates.ZopePageTemplate</string> + <string>ZopePageTemplate</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -96,8 +99,8 @@ IDEAS:\n <tal:block tal:repeat="js js_list">\n <script tal:attributes="src js" type="text/javascript"></script>\n </tal:block>\n - <link rel="icon" tal:attributes="href string:${portal/portal_url}/favicon.ico" type="image/x-icon" />\n - <link rel="shortcut icon" tal:attributes="href string:${portal/portal_url}/favicon.ico" type="image/x-icon" />\n + <link rel="icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />\n + <link rel="shortcut icon" tal:attributes="href string:${portal_path}/favicon.ico" type="image/x-icon" />\n </head>\n <body>\n <form id="main_form"\n @@ -115,7 +118,7 @@ IDEAS:\n <tal:block metal:define-slot="layout">\n <div id="bars">\n <div id="main_bar"\n - tal:content="structure here/ERP5Site_renderCachedNavigationBox">\n + tal:content="structure portal/ERP5Site_renderCachedNavigationBox">\n </div>\n <div id="context_bar">\n <tal:block metal:define-slot="context_bar" />\n @@ -129,9 +132,9 @@ IDEAS:\n </tal:block>\n </div>\n <div id="logged_in_as">\n - <tal:block tal:condition="not: here/portal_membership/isAnonymousUser">\n + <tal:block tal:condition="not: portal/portal_membership/isAnonymousUser">\n <span class="logged_txt" i18n:translate="" i18n:domain="ui">Logged In as :</span>\n - <tal:block tal:replace="python:here.portal_membership.getAuthenticatedMember().getUserName()" />\n + <tal:block tal:replace="python:portal.portal_membership.getAuthenticatedMember().getUserName()" />\n </tal:block>\n </div>\n <p class="clear"></p>\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/view_main.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/view_main.xml index 353f2ec1d6..121af212a7 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/view_main.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/view_main.xml @@ -3,8 +3,11 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/> - <tuple/> + <tuple> + <string>Products.PageTemplates.ZopePageTemplate</string> + <string>ZopePageTemplate</string> + </tuple> + <none/> </tuple> </pickle> <pickle> @@ -60,10 +63,11 @@ object_path here/getPath | nothing;\n form nocall: form | nothing;\n form_id form/id | template/title_or_id | nothing;\n - form_action python: form and form.action not in (\'\', None) and here.portal_membership.checkPermission(\'Modify portal content\', here) and form.action or nothing;\n + portal here/getPortalObject;\n + form_action python: form and form.action not in (\'\', None) and portal.portal_membership.checkPermission(\'Modify portal content\', here) and form.action or nothing;\n local_parameter_list local_parameter_list | python: {};\n dummy python: local_parameter_list.update({\'object_uid\': object_uid, \'object_path\': object_path, \'form_id\': form_id});\n - title python: \'%s - %s\' % (here.Base_translateString(template.title_or_id()), here.title_or_id());\n + title python: \'%s - %s\' % (portal.Base_translateString(template.title_or_id()), here.title_or_id());\n ">\n <tal:block metal:use-macro="here/main_template/macros/master">\n <tal:block metal:fill-slot="context_bar">\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log index fd2c50df5b..200204fadb 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log @@ -1,3 +1,6 @@ +2007-12-18 yo +* Acquire skins and tools from a portal, whenever possible. + 2007-11-21 kazuhiko * Make Page Templates themselves valid XML (except DOCTYPE definition). diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index a8114de9cf..02416eb97c 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -462 \ No newline at end of file +467 \ No newline at end of file -- 2.30.9