From 9f9aab159e3186e492f4fcff701baba2bbda6447 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Fri, 22 Sep 2006 08:55:23 +0000 Subject: [PATCH] Remove duplicated script. Update its callers. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10237 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ERP5XhtmlStyle_getModuleItemList.xml | 182 ------------------ .../erp5_xhtml_style/index_html.xml | 2 +- .../template_erp5_xhtml_style.xml | 2 +- .../bootstrap/erp5_xhtml_style/bt/revision | 2 +- 4 files changed, 3 insertions(+), 185 deletions(-) delete mode 100644 product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_getModuleItemList.xml diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_getModuleItemList.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_getModuleItemList.xml deleted file mode 100644 index 339a210478..0000000000 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_getModuleItemList.xml +++ /dev/null @@ -1,182 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <tuple> - <tuple> - <string>Products.PythonScripts.PythonScript</string> - <string>PythonScript</string> - </tuple> - <none/> - </tuple> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>Python_magic</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>Script_magic</string> </key> - <value> <int>3</int> </value> - </item> - <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_container</string> </key> - <value> <string>container</string> </value> - </item> - <item> - <key> <string>name_context</string> </key> - <value> <string>context</string> </value> - </item> - <item> - <key> <string>name_m_self</string> </key> - <value> <string>script</string> </value> - </item> - <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>_body</string> </key> - <value> <string>from Products.ERP5Type.Cache import CachingMethod, clearCache\n -from ZODB.POSException import ConflictError\n -\n -user = context.portal_membership.getAuthenticatedMember().getUserName()\n -\n -portal = context.getPortalObject()\n -\n -def getModuleItemList(user=None, portal_path=None):\n - gettext = context.Localizer.erp5_ui.gettext\n - item_list = []\n - try :\n - for module_id in portal.objectIds(\'ERP5 Folder\'):\n - try:\n - module = portal[module_id]\n - url = module.getPath()\n - label = module.getTitleOrId()\n - label = gettext(label)\n - item_list.append((label, url))\n - except ConflictError : raise\n - except: pass\n - except ConflictError : raise\n - except: pass\n -\n - def compareModules(a, b): return cmp(a[0], b[0])\n - item_list.sort(compareModules)\n - return item_list\n -\n -getModuleItemList = CachingMethod(getModuleItemList, id=\'ERP5Site_getModuleItemList\')\n -portal_path = context.getPortalObject().getPhysicalPath()\n -return getModuleItemList(user=user, portal_path=portal_path)\n -</string> </value> - </item> - <item> - <key> <string>_code</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>_filepath</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>_params</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>errors</string> </key> - <value> - <tuple/> - </value> - </item> - <item> - <key> <string>func_code</string> </key> - <value> - <object> - <klass> - <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> - </klass> - <tuple/> - <state> - <dictionary> - <item> - <key> <string>co_argcount</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>co_varnames</string> </key> - <value> - <tuple> - <string>Products.ERP5Type.Cache</string> - <string>CachingMethod</string> - <string>clearCache</string> - <string>ZODB.POSException</string> - <string>ConflictError</string> - <string>_getattr_</string> - <string>context</string> - <string>user</string> - <string>portal</string> - <string>None</string> - <string>getModuleItemList</string> - <string>portal_path</string> - </tuple> - </value> - </item> - </dictionary> - </state> - </object> - </value> - </item> - <item> - <key> <string>func_defaults</string> </key> - <value> - <none/> - </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>ERP5XhtmlStyle_getModuleItemList</string> </value> - </item> - <item> - <key> <string>warnings</string> </key> - <value> - <tuple/> - </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> 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 7cd0bb988b..5b04f12c6f 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 @@ -82,7 +82,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\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/ERP5XhtmlStyle_getModuleItemList;\n + <tr tal:define="module_list here/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/template_erp5_xhtml_style.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml index 30726d0daf..0016ca8cdf 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 @@ -156,7 +156,7 @@ IDEAS:\n <span class="separator"></span>\n <span id="modules">\n <select name="select_module"\n - tal:define="module_list here/ERP5XhtmlStyle_getModuleItemList;"\n + tal:define="module_list here/ERP5Site_getModuleItemList;"\n tal:attributes="onChange string:submitAction(this.form,\'${url}/Base_doModule\')">\n <option selected="selected" value="" i18n:translate="" i18n:domain="ui">ERP5 Modules</option>\n <tal:block tal:repeat="module module_list">\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index cd7da05e3d..dba40afcf7 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -210 +211 -- 2.30.9