[Erp5-report] r23828 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 25 17:44:18 CEST 2008
Author: kazuhiko
Date: Thu Sep 25 17:44:18 2008
New Revision: 23828
URL: http://svn.erp5.org?rev=23828&view=rev
Log:
* optimise TALES (use STRING expression or PATH expression instead of PYTHON expression if possible).
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/developper_shortcut_render.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/field_render.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml?rev=23828&r1=23827&r2=23828&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.xml Thu Sep 25 17:44:18 2008
@@ -56,13 +56,13 @@
<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">Edit Portal Type \'<tal:block tal:content="python: here.getPortalTypeName()"\n
+ i18n:translate="" i18n:domain="ui">Edit Portal Type \'<tal:block tal:content="here/getPortalTypeName"\n
i18n:name="portal_type" i18n:translate="" i18n:domain="ui" />\'</option>\n
</tal:block>\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: portal.portal_workflow.getWorkflowsFor(here)">\n
- <option tal:attributes="value python: \'%s/manage_properties\' % (workflow.absolute_url(), )" tal:content="workflow/title" />\n
+ <option tal:attributes="value string:${workflow/absolute_url}/manage_properties" tal:content="workflow/title" />\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
@@ -84,7 +84,7 @@
i18n:translate="" i18n:domain="ui">Action...</option>\n
<tal:block tal:define="allowed_content_type_list here/getVisibleAllowedContentTypeList | python:[]">\n
<tal:block tal:repeat="content_id allowed_content_type_list">\n
- <option tal:attributes="value python: \'add %s\' % (content_id, )"\n
+ <option tal:attributes="value string:add $content_id"\n
i18n:translate="" i18n:domain="ui">Add <tal:block tal:content="content_id"\n
i18n:name="portal_type" i18n:translate="" i18n:domain="ui" /></option>\n
</tal:block>\n
@@ -97,7 +97,7 @@
tal:condition="document_template_list">\n
<option disabled="disabled">-- <tal:block i18n:translate="" i18n:domain="ui">Templates</tal:block> --</option>\n
<tal:block tal:repeat="document_template document_template_list">\n
- <option tal:attributes="value python:\'template %s\' % (document_template.getRelativeUrl(), )"\n
+ <option tal:attributes="value string:template ${document_template/getRelativeUrl}"\n
i18n:translate="" i18n:domain="ui">Add <tal:block tal:content="document_template/getTitle"\n
i18n:name="document_template" /></option>\n
</tal:block>\n
@@ -105,13 +105,13 @@
<option disabled="disabled">-- <tal:block i18n:translate="" i18n:domain="ui">Workflows</tal:block> --</option>\n
<tal:block tal:repeat="action actions/workflow">\n
<option tal:content="action/name"\n
- tal:attributes="value python: \'workflow %s\' % (action[\'url\'], )"\n
+ tal:attributes="value string:workflow ${action/url}"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
<option disabled="disabled">-- <tal:block i18n:translate="" i18n:domain="ui">Object</tal:block> --</option>\n
<tal:block tal:repeat="action actions/object_action | nothing">\n
<option tal:content="action/name"\n
- tal:attributes="value python: \'object %s\' % (action[\'url\'], )"\n
+ tal:attributes="value string:object ${action/url}"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
<tal:block tal:define="object_view_list actions/object_view|nothing;\n
@@ -119,7 +119,7 @@
tal:condition="module_view_list">\n
<tal:block tal:repeat="action module_view_list">\n
<option tal:content="action/name"\n
- tal:attributes="value python: \'object %s\' % (action[\'url\'],)"\n
+ tal:attributes="value string:object ${action/url}"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
</tal:block>\n
@@ -128,7 +128,7 @@
<option disabled="disabled">-- <tal:block i18n:translate="" i18n:domain="ui">Folder</tal:block> --</option>\n
<tal:block tal:repeat="action actions/folder">\n
<option tal:content="action/name"\n
- tal:attributes="value python: \'folder %s\' % (action[\'url\'], )"\n
+ tal:attributes="value string:folder ${action/url}"\n
i18n:translate="" i18n:domain="ui" />\n
</tal:block>\n
</tal:block>\n
@@ -185,8 +185,8 @@
<span class="description" i18n:translate="" i18n:domain="ui">New</span>\n
</button>\n
<button class="clone" type="submit" title="Clone"\n
- tal:condition="python: not list_mode"\n
- tal:attributes="name python: \'Base_createCloneDocument:method\'"\n
+ tal:condition="not: list_mode"\n
+ tal:attributes="name string:Base_createCloneDocument:method"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Clone</span>\n
@@ -200,13 +200,13 @@
<tal:block tal:condition="request/selection_index | nothing">\n
<span class="separator"><!--separator--></span>\n
<a class="jump_first" title="First"\n
- tal:attributes="href python: \'portal_selections/viewFirst?%s\' % (http_parameters, )"\n
+ tal:attributes="href string:portal_selections/viewFirst?$http_parameters"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">First</span>\n
</a>\n
<a class="jump_previous" title="Previous"\n
- tal:attributes="href python: \'portal_selections/viewPrevious?%s\' % (http_parameters, )"\n
+ tal:attributes="href string:portal_selections/viewPrevious?$http_parameters"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Previous</span>\n
@@ -217,13 +217,13 @@
<span class="description" i18n:translate="" i18n:domain="ui">List Mode</span>\n
</a>\n
<a class="jump_next" title="Next"\n
- tal:attributes="href python: \'portal_selections/viewNext?%s\' % (http_parameters, )"\n
+ tal:attributes="href string:portal_selections/viewNext?$http_parameters"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Next</span>\n
</a>\n
<a class="jump_last" title="Last"\n
- tal:attributes="href python: \'portal_selections/viewLast?%s\' % (http_parameters, )"\n
+ tal:attributes="href string:portal_selections/viewLast?$http_parameters"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
<span class="description" i18n:translate="" i18n:domain="ui">Last</span>\n
@@ -280,9 +280,9 @@
<tal:block tal:repeat="button_action button_actions">\n
<a tal:attributes="href python: \'%s%s%s\' % (button_action[\'url\'], \'?\' in button_action[\'url\'] and \'&\' or \'?\', http_parameters)">\n
<img i18n:attributes="title" i18n:domain="ui"\n
- tal:attributes="src python:button_action[\'icon\'];\n
- title python:button_action[\'name\'];\n
- alt python:button_action[\'name\']" />\n
+ tal:attributes="src button_action/icon;\n
+ title button_action/name;\n
+ alt button_action/name" />\n
</a>\n
</tal:block>\n
</tal:block>\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/developper_shortcut_render.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/developper_shortcut_render.xml?rev=23828&r1=23827&r2=23828&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/developper_shortcut_render.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/developper_shortcut_render.xml Thu Sep 25 17:44:18 2008
@@ -45,23 +45,23 @@
<tal:block metal:define-macro="edit_link">\n
<a tabindex="1000" tal:condition="python: (getattr(object, \'meta_type\', None) is not None) and (getattr(object, \'getPortalObject\', None) is not None)"\n
tal:attributes="href python: \'%s/manage_main\' % (\'/\'.join(object.getPhysicalPath()[len(object.getPortalObject().getPhysicalPath()):])) # XXX: quick hack to get path;\n
- title info;"><img tal:attributes="src python: \'%s/images/%s\' % (portal_path, image);\n
+ title info;"><img tal:attributes="src string:$portal_path/images/$image;\n
alt info;" /></a>\n
</tal:block>\n
<tal:block metal:define-macro="translate_link">\n
<a tabindex="1000" tal:define="image image | python: \'translate.png\'"\n
tal:attributes="href python: \'%s/manage_messages?regex=^%s%%24&lang=%s\' % (\'/\'.join(here.Localizer.erp5_ui.getPhysicalPath()[len(here.Localizer.erp5_ui.getPortalObject().getPhysicalPath()):]), message.replace(\'(\', \'\\(\').replace(\')\', \'\\)\'), selected_language);\n
- title info;"><img tal:attributes="src python: \'%s/images/%s\' % (portal_path, image);\n
+ title info;"><img tal:attributes="src string:$portal_path/images/$image;\n
alt info;" /></a>\n
</tal:block>\n
<tal:block metal:define-macro="form">\n
- <tal:block tal:define="image python: \'editform.png\';\n
- info python: \'Edit this form\';\n
+ <tal:block tal:define="image string:editform.png;\n
+ info string:Edit this form;\n
object nocall: form;">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/edit_link" />\n
</tal:block>\n
- <tal:block tal:define="image python: \'editformaction.png\';\n
- info python: \'Edit this form\\\'s action\';\n
+ <tal:block tal:define="image string:editformaction.png;\n
+ info string:Edit this form\'s action;\n
object python: getattr(here, form.action, None);">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/edit_link" />\n
<div class="clear">\n
@@ -69,23 +69,23 @@
</tal:block>\n
</tal:block>\n
<tal:block metal:define-macro="field_developper">\n
- <tal:block tal:define="image python: \'editfield.png\';\n
- info python: \'Edit this field\';\n
+ <tal:block tal:define="image string:editfield.png;\n
+ info string:Edit this field;\n
object nocall: field;">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/edit_link" />\n
</tal:block>\n
</tal:block>\n
<tal:block metal:define-macro="field_translator">\n
- <tal:block tal:define="info python: \'Translate this field title\';\n
- message python: field[\'title\'];\n
- image python: \'translate.png\'">\n
+ <tal:block tal:define="info string:Translate this field title;\n
+ message field/title;\n
+ image string:translate.png">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/translate_link" />\n
</tal:block>\n
<tal:block tal:condition="field_description | nothing">\n
<tal:block tal:define="message field_description;\n
- info python: \'Translate this field description\';\n
- image python: \'translate_tooltip.png\'"\n
- tal:condition="python: message not in (None, \'\')">\n
+ info string:Translate this field description;\n
+ image string:translate_tooltip.png"\n
+ tal:condition="message | nothing">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/translate_link" />\n
</tal:block>\n
</tal:block>\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/field_render.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/field_render.xml?rev=23828&r1=23827&r2=23828&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/field_render.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/field_render.xml Thu Sep 25 17:44:18 2008
@@ -68,7 +68,7 @@
</tal:block>\n
</label>\n
<div class="input" tal:content="structure python: html_tuple[1]" />\n
- <span tal:condition="python: field_has_error"\n
+ <span tal:condition="field_has_error"\n
class="error"\n
tal:content="python: field_errors[field_id].error_text"\n
i18n:translate="" i18n:domain="ui" />\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml?rev=23828&r1=23827&r2=23828&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml Thu Sep 25 17:44:18 2008
@@ -87,7 +87,7 @@
\n
<tal:block metal:define-macro="content">\n
<div class="content"\n
- tal:define="group_list python: form.Form_getGroupTitleAndId();\n
+ tal:define="group_list form/Form_getGroupTitleAndId;\n
gid_list python: \' \'.join([x[\'gid\'] for x in group_list if x not in (\'bottom\', \'hidden\')]);">\n
<tal:block tal:repeat="group group_list">\n
<tal:block tal:define="gid group/gid">\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml?rev=23828&r1=23827&r2=23828&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml Thu Sep 25 17:44:18 2008
@@ -71,7 +71,7 @@
<tal:block\n
tal:define="field_errors python: request.get(\'field_errors\', {});\n
dummy python: request.set(\'here\', here);\n
- group_list python: form.Form_getGroupTitleAndId();\n
+ group_list form/Form_getGroupTitleAndId;\n
gid_list python: \' \'.join([x[\'gid\'] for x in group_list if x!=\'hidden\']);\n
field_render nocall: here/field_render/macros/field_render">\n
<tal:block tal:condition="preferred_html_style_developper_mode">\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml?rev=23828&r1=23827&r2=23828&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml Thu Sep 25 17:44:18 2008
@@ -75,7 +75,7 @@
<tal:block tal:define="css python: field.render_css(REQUEST=request)">\n
<style tal:condition="python: css is not None"\n
tal:content="css"\n
- tal:attributes="type python:\'text/css\'">\n
+ tal:attributes="type string:text/css">\n
</style>\n
</tal:block>\n
<tal:block tal:define="dummy python: css_list.extend(field.get_css_list(REQUEST=request))" />\n
@@ -83,10 +83,10 @@
</tal:block>\n
</tal:block>\n
</tal:block>\n
- <tal:block tal:repeat="css python: css_list">\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 tal:repeat="js python: js_list">\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_path}/favicon.ico" type="image/x-icon" />\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=23828&r1=23827&r2=23828&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Thu Sep 25 17:44:18 2008
@@ -1,1 +1,1 @@
-613
+614
More information about the Erp5-report
mailing list