Commit d63efd33 authored by Fabien Morin's avatar Fabien Morin

update ERP5Site_processAdvancedSearch to be able to handle portal_type

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26394 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0c946077
...@@ -53,11 +53,24 @@ ...@@ -53,11 +53,24 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if top_your_search_text is not None:\n <value> <string>translateString = context.Base_translateString\n
your_search_text = top_your_search_text\n translated_type = \'\'\n
\n
if top_your_search_portal_type:\n
if top_your_search_portal_type == \'all\':\n
return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
keep_items=dict(SearchableText=top_your_search_text, reset=1,\n
your_search_text=top_your_search_text,\n
portal_type=list(context.getPortalDocumentTypeList()),\n
list_style = \'search\',\n
all_languages=all_languages))\n
\n
translated_type = translateString(top_your_search_portal_type)\n
\n
return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
keep_items=dict(SearchableText=your_search_text, reset=1,\n keep_items=dict(SearchableText=top_your_search_text, reset=1,\n
your_search_text=your_search_text,\n your_search_text=top_your_search_text,\n
translated_portal_type=translated_type,\n
list_style = \'search\',\n list_style = \'search\',\n
all_languages=all_languages))\n all_languages=all_languages))\n
</string> </value> </string> </value>
...@@ -70,7 +83,7 @@ return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n ...@@ -70,7 +83,7 @@ return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>your_search_text=None, top_your_search_text=None, all_languages=False</string> </value> <value> <string>your_search_text=None, top_your_search_text=None, top_your_search_portal_type, all_languages=False</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -90,7 +103,7 @@ return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n ...@@ -90,7 +103,7 @@ return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>3</int> </value> <value> <int>4</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -98,11 +111,14 @@ return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n ...@@ -98,11 +111,14 @@ return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
<tuple> <tuple>
<string>your_search_text</string> <string>your_search_text</string>
<string>top_your_search_text</string> <string>top_your_search_text</string>
<string>top_your_search_portal_type</string>
<string>all_languages</string> <string>all_languages</string>
<string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>translateString</string>
<string>translated_type</string>
<string>dict</string> <string>dict</string>
<string>list</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -115,6 +131,7 @@ return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n ...@@ -115,6 +131,7 @@ return context.Base_redirect(\'ERP5Site_viewSearchResult\',\n
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple> <tuple>
<none/>
<none/> <none/>
<none/> <none/>
<int>0</int> <int>0</int>
......
1150 1151
\ No newline at end of file \ No newline at end of file
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