Commit cda9b884 authored by Ivan Tyagov's avatar Ivan Tyagov

Rename search forms to follow ERP5's default search form way.

Rename search form's get&count scripts.
Clean up.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43798 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6eb671b6
...@@ -50,26 +50,21 @@ ...@@ -50,26 +50,21 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if search_section_path is not None:\n <value> <string>"""\n
section_value = context.getPortalObject().restrictedTraverse(search_section_path)\n Count number of result list of all documents found by specified keyword arguments.\n
if kw[\'portal_type\'] == [\'Assignment\'] and \\\n """\n
section_value.getMembershipCriterionBaseCategoryList() == [\'follow_up\']:\n
# This is a hack to make sure project members are displayed whenever follow_up base\n
# category is used\n
section_value = section_value.asContext(membership_criterion_base_category = [\'destination_project\'],\n
membership_criterion_category = [section_value.getMembershipCriterionCategory().replace(\'follow_up/\', \'destination_project/\')])\n
return section_value.countResults(**kw)\n
\n \n
context.log(context.portal_catalog(src__=1, **kw))\n
return context.portal_catalog.countResults(**kw)\n return context.portal_catalog.countResults(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>search_section_path=None, **kw</string> </value> <value> <string>**kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSite_countAdvancedSearchResultList</string> </value> <value> <string>WebSite_countFullTextSearchResultList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -50,26 +50,21 @@ ...@@ -50,26 +50,21 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>if search_section_path is not None:\n <value> <string>"""\n
section_value = context.getPortalObject().restrictedTraverse(search_section_path)\n Return the result list of all documents found by specified keyword arguments.\n
if kw[\'portal_type\'] == [\'Assignment\'] and \\\n """\n
section_value.getMembershipCriterionBaseCategoryList() == [\'follow_up\']:\n
# This is a hack to make sure project members are displayed whenever follow_up base\n
# category is used\n
section_value = section_value.asContext(membership_criterion_base_category = [\'destination_project\'],\n
membership_criterion_category = [section_value.getMembershipCriterionCategory().replace(\'follow_up/\', \'destination_project/\')])\n
return section_value.searchResults(**kw)\n
\n \n
context.log(context.portal_catalog(src__=1, **kw))\n
return context.portal_catalog(**kw)\n return context.portal_catalog(**kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>search_section_path=None, **kw</string> </value> <value> <string>**kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSite_getAdvancedSearchResultList</string> </value> <value> <string>WebSite_getFullTextSearchResultList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -52,16 +52,14 @@ ...@@ -52,16 +52,14 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""\n <value> <string>"""\n
Puts all the arguments from advanced search dialog form together as \n Puts all the arguments from advanced search dialog form together as \n
a parseable search string. \n a parse-able search string. \n
"""\n """\n
request = context.REQUEST\n
portal = context.getPortalObject()\n
searchable_text = context.Base_assembleSearchString()\n
kw[\'list_style\'] = \'search\'\n
kw[\'full_text\'] = searchable_text\n
kw[\'language\'] = \'\'\n
kw[\'reset\'] = 1\n kw[\'reset\'] = 1\n
return context.Base_redirect(\'WebSite_viewAdvancedSearchResultList\', keep_items=kw)\n kw[\'language\'] = \'\'\n
kw[\'list_style\'] = \'search\'\n
kw[\'search_text\'] = context.Base_assembleSearchString()\n
\n
return context.Base_redirect(\'WebSite_viewSearchResultList\', keep_items=kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<string>editable_columns</string> <string>editable_columns</string>
<string>list_method</string> <string>list_method</string>
<string>search_columns</string> <string>search_columns</string>
<string>selection_name</string>
<string>sort_columns</string> <string>sort_columns</string>
<string>title</string> <string>title</string>
</list> </list>
...@@ -374,10 +373,6 @@ ...@@ -374,10 +373,6 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>document_selection</string> </value>
</item>
<item> <item>
<key> <string>sort_columns</string> </key> <key> <string>sort_columns</string> </key>
<value> <value>
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
</item> </item>
<item> <item>
<key> <string>search</string> </key> <key> <string>search</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>select</string> </key> <key> <string>select</string> </key>
......
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
</item> </item>
<item> <item>
<key> <string>search</string> </key> <key> <string>search</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>select</string> </key> <key> <string>select</string> </key>
......
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>string:WebSite_viewAdvancedSearchResultList</string> </value> <value> <string>string:WebSite_viewSearchResultList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>WebSite_viewAdvancedSearchResultList</string> </value> <value> <string>WebSite_viewSearchResultList</string> </value>
</item> </item>
<item> <item>
<key> <string>method</string> </key> <key> <string>method</string> </key>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<string>global_search_column</string> <string>global_search_column</string>
<string>list_method</string> <string>list_method</string>
<string>select</string> <string>select</string>
<string>selection_name</string>
<string>style_columns</string> <string>style_columns</string>
<string>title</string> <string>title</string>
</list> </list>
...@@ -147,7 +146,7 @@ ...@@ -147,7 +146,7 @@
</item> </item>
<item> <item>
<key> <string>global_search_column</string> </key> <key> <string>global_search_column</string> </key>
<value> <string>full_text</string> </value> <value> <string>search_text</string> </value>
</item> </item>
<item> <item>
<key> <string>list_method</string> </key> <key> <string>list_method</string> </key>
...@@ -159,10 +158,6 @@ ...@@ -159,10 +158,6 @@
<key> <string>select</string> </key> <key> <string>select</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>web_search_result_selection</string> </value>
</item>
<item> <item>
<key> <string>style_columns</string> </key> <key> <string>style_columns</string> </key>
<value> <value>
...@@ -200,7 +195,7 @@ ...@@ -200,7 +195,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>method_name</string> </key> <key> <string>method_name</string> </key>
<value> <string>WebSite_countAdvancedSearchResultList</string> </value> <value> <string>WebSite_countFullTextSearchResultList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -213,7 +208,7 @@ ...@@ -213,7 +208,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>method_name</string> </key> <key> <string>method_name</string> </key>
<value> <string>WebSite_getAdvancedSearchResultList</string> </value> <value> <string>WebSite_getFullTextSearchResultList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
1759 1761
\ 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