Commit 9f9aab15 authored by Vincent Pelletier's avatar Vincent Pelletier

Remove duplicated script.

Update its callers.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10237 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee1a15ce
<?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>
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment