Commit 4a2d900a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use selection_name instead of selection.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13823 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e98aa91e
...@@ -127,6 +127,7 @@ return url\n ...@@ -127,6 +127,7 @@ return url\n
<string>selection</string> <string>selection</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>index</string> <string>index</string>
<string>context</string>
<string>object</string> <string>object</string>
<string>None</string> <string>None</string>
<string>url</string> <string>url</string>
...@@ -144,6 +145,7 @@ return url\n ...@@ -144,6 +145,7 @@ return url\n
<tuple> <tuple>
<none/> <none/>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -133,6 +133,7 @@ return object.getPath() + \'/\' + method + \'?\' + make_query(kw)\n ...@@ -133,6 +133,7 @@ return object.getPath() + \'/\' + method + \'?\' + make_query(kw)\n
<string>make_query</string> <string>make_query</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>index</string> <string>index</string>
<string>context</string>
<string>object</string> <string>object</string>
<string>method</string> <string>method</string>
<string>str</string> <string>str</string>
...@@ -151,6 +152,7 @@ return object.getPath() + \'/\' + method + \'?\' + make_query(kw)\n ...@@ -151,6 +152,7 @@ return object.getPath() + \'/\' + method + \'?\' + make_query(kw)\n
<tuple> <tuple>
<none/> <none/>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if selection!=None:\n <value> <string>if selection_name is not None:\n
\n \n
reference_variation_category_list = selection.getParams()[\'reference_variation_category_list\' ]\n reference_variation_category_list = context.portal_selections.getSelectionParamsFor(selection_name)[\'reference_variation_category_list\']\n
request = context.REQUEST\n request = context.REQUEST\n
request.other[\'categories\'] = reference_variation_category_list\n request.other[\'categories\'] = reference_variation_category_list\n
tmp_context = context.asContext(context=context, REQUEST=request)\n tmp_context = context.asContext(context=context, REQUEST=request)\n
...@@ -105,7 +105,7 @@ else:\n ...@@ -105,7 +105,7 @@ else:\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>selection=None</string> </value> <value> <string>selection=None, selection_name=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -125,18 +125,19 @@ else:\n ...@@ -125,18 +125,19 @@ else:\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>selection</string> <string>selection</string>
<string>selection_name</string>
<string>None</string> <string>None</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>reference_variation_category_list</string>
<string>context</string> <string>context</string>
<string>reference_variation_category_list</string>
<string>request</string> <string>request</string>
<string>_write_</string> <string>_write_</string>
<string>tmp_context</string> <string>tmp_context</string>
...@@ -155,6 +156,7 @@ else:\n ...@@ -155,6 +156,7 @@ else:\n
<value> <value>
<tuple> <tuple>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if selection!=None:\n <value> <string>if selection_name is not None:\n
\n \n
reference_variation_category_list = selection.getParams()[\'reference_variation_category_list\' ]\n reference_variation_category_list = context.portal_selections.getSelectionParamsFor(selection_name)[\'reference_variation_category_list\']\n
request = context.REQUEST\n request = context.REQUEST\n
request.other[\'categories\'] = reference_variation_category_list\n request.other[\'categories\'] = reference_variation_category_list\n
tmp_context = context.asContext(context=context, REQUEST=request)\n tmp_context = context.asContext(context=context, REQUEST=request)\n
...@@ -105,7 +105,7 @@ else:\n ...@@ -105,7 +105,7 @@ else:\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>selection=None</string> </value> <value> <string>selection=None, selection_name=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -125,18 +125,19 @@ else:\n ...@@ -125,18 +125,19 @@ else:\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>selection</string> <string>selection</string>
<string>selection_name</string>
<string>None</string> <string>None</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>reference_variation_category_list</string>
<string>context</string> <string>context</string>
<string>reference_variation_category_list</string>
<string>request</string> <string>request</string>
<string>_write_</string> <string>_write_</string>
<string>tmp_context</string> <string>tmp_context</string>
...@@ -155,6 +156,7 @@ else:\n ...@@ -155,6 +156,7 @@ else:\n
<value> <value>
<tuple> <tuple>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -70,8 +70,6 @@ ...@@ -70,8 +70,6 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from ZTUtils import make_query\n <value> <string>from ZTUtils import make_query\n
\n \n
index = selection.getIndex()\n
name = selection.getName()\n
object = brain.getObject()\n object = brain.getObject()\n
if object is None:\n if object is None:\n
return None\n return None\n
...@@ -131,8 +129,6 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n ...@@ -131,8 +129,6 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n
<string>ZTUtils</string> <string>ZTUtils</string>
<string>make_query</string> <string>make_query</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>index</string>
<string>name</string>
<string>object</string> <string>object</string>
<string>None</string> <string>None</string>
<string>url</string> <string>url</string>
......
...@@ -70,8 +70,7 @@ ...@@ -70,8 +70,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from ZTUtils import make_query\n <value> <string>from ZTUtils import make_query\n
\n \n
index = selection.getIndex()\n index = context.portal_selections.getSelectionIndexFor(selection_name)\n
name = selection.getName()\n
object = brain.getObject()\n object = brain.getObject()\n
if object is None:\n if object is None:\n
return None\n return None\n
...@@ -79,7 +78,7 @@ if object is None:\n ...@@ -79,7 +78,7 @@ if object is None:\n
url = object.absolute_url()\n url = object.absolute_url()\n
method = \'Base_download\'\n method = \'Base_download\'\n
kw = { \n kw = { \n
\'selection_name\' : selection.getName() ,\n \'selection_name\' : selection_name,\n
\'selection_index\' : index,\n \'selection_index\' : index,\n
}\n }\n
\n \n
...@@ -100,7 +99,7 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n ...@@ -100,7 +99,7 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>brain=None, selection=None</string> </value> <value> <string>brain=None, selection=None, selection_name=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -120,7 +119,7 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n ...@@ -120,7 +119,7 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>2</int> </value> <value> <int>3</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -128,11 +127,12 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n ...@@ -128,11 +127,12 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n
<tuple> <tuple>
<string>brain</string> <string>brain</string>
<string>selection</string> <string>selection</string>
<string>selection_name</string>
<string>ZTUtils</string> <string>ZTUtils</string>
<string>make_query</string> <string>make_query</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>index</string> <string>index</string>
<string>name</string>
<string>object</string> <string>object</string>
<string>None</string> <string>None</string>
<string>url</string> <string>url</string>
...@@ -152,6 +152,7 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n ...@@ -152,6 +152,7 @@ return url + \'/\' + method + \'?\' + make_query(kw)\n
<tuple> <tuple>
<none/> <none/>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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