Commit 22cabed1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

accept list_style parameter. use list_style="search" by default for web mode.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26703 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2d0f4cd5
......@@ -56,7 +56,8 @@
<value> <string>kw = {\'reset\':1,\n
\'SearchableText\':field_your_search_text,\n
\'your_search_text\':field_your_search_text,\n
\'all_languages\':all_languages}\n
\'all_languages\':all_languages,\n
\'list_style\':list_style}\n
\n
if field_your_search_portal_type:\n
if field_your_search_portal_type == \'all\':\n
......@@ -64,11 +65,14 @@ if field_your_search_portal_type:\n
else:\n
kw.update({\'portal_type\':context.Base_translateString(field_your_search_portal_type)})\n
\n
# use non-web quick search if ignore_layout is explicitly set.\n
if bool(context.REQUEST.get(\'ignore_layout\', False)):\n
search_context = context.getPortalObject()\n
getWebSectionValue = getattr(context, \'getWebSectionValue\', None)\n
if getWebSectionValue is not None and \\\n
not bool(context.REQUEST.get(\'ignore_layout\', False)):\n
search_context = getWebSectionValue()\n
if list_style is None:\n
kw.update({\'list_style\':\'search\'})\n
else:\n
search_context = getattr(context, \'getWebSectionValue\', context.getPortalObject)() \n
search_context = context.getPortalObject()\n
\n
return search_context.Base_redirect(\'ERP5Site_viewSearchResult\', keep_items=kw)\n
</string> </value>
......@@ -81,7 +85,7 @@ return search_context.Base_redirect(\'ERP5Site_viewSearchResult\', keep_items=kw
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>field_your_search_text=\'\', field_your_search_portal_type=\'\', all_languages=False</string> </value>
<value> <string>field_your_search_text=\'\', field_your_search_portal_type=\'\', all_languages=False, list_style=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -101,7 +105,7 @@ return search_context.Base_redirect(\'ERP5Site_viewSearchResult\', keep_items=kw
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -110,14 +114,17 @@ return search_context.Base_redirect(\'ERP5Site_viewSearchResult\', keep_items=kw
<string>field_your_search_text</string>
<string>field_your_search_portal_type</string>
<string>all_languages</string>
<string>list_style</string>
<string>kw</string>
<string>_getattr_</string>
<string>list</string>
<string>context</string>
<string>getattr</string>
<string>None</string>
<string>getWebSectionValue</string>
<string>bool</string>
<string>False</string>
<string>search_context</string>
<string>getattr</string>
</tuple>
</value>
</item>
......@@ -133,6 +140,7 @@ return search_context.Base_redirect(\'ERP5Site_viewSearchResult\', keep_items=kw
<string></string>
<string></string>
<int>0</int>
<none/>
</tuple>
</value>
</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