Commit 0511fe33 authored by Łukasz Nowak's avatar Łukasz Nowak

follow_up replaces aggregate.

Additionaly start to use full text search.
parent de62e4a9
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
portal_catalog = context.getPortalObject().portal_catalog\n portal_catalog = context.getPortalObject().portal_catalog\n
kw = {}\n kw = {}\n
\n \n
if title is not None:\n if query is not None:\n
kw[\'title\'] = title\n kw[\'full_text\'] = query\n
if uid is not None:\n if uid is not None:\n
kw[\'uid\'] = uid\n kw[\'uid\'] = uid\n
\n \n
...@@ -88,7 +88,7 @@ for q in result[:5]:\n ...@@ -88,7 +88,7 @@ for q in result[:5]:\n
\'uid\': q.UID,\n \'uid\': q.UID,\n
\'title\': q.TITLE,\n \'title\': q.TITLE,\n
\'description\': q.DESCRIPTION,\n \'description\': q.DESCRIPTION,\n
\'image_url\': context.getPermanentURL(o.getAggregateValue(portal_type=\'Software Product\').getDefaultImageValue()) + \'/Base_download\',\n \'image_url\': context.getPermanentURL(o.getFollowUpValue(portal_type=\'Software Product\').getDefaultImageValue()) + \'/Base_download\',\n
\'document_url\': context.getPermanentURL(o),\n \'document_url\': context.getPermanentURL(o),\n
\'url\': q.SOFTWARE_RELEASE_URL,\n \'url\': q.SOFTWARE_RELEASE_URL,\n
})\n })\n
...@@ -98,7 +98,7 @@ return context.asJSON({\n ...@@ -98,7 +98,7 @@ return context.asJSON({\n
\'before\': page > 0 and True or False,\n \'before\': page > 0 and True or False,\n
\'after\': after,\n \'after\': after,\n
\'page\': page,\n \'page\': page,\n
\'title\': title\n \'query\': query\n
})\n })\n
...@@ -106,7 +106,7 @@ return context.asJSON({\n ...@@ -106,7 +106,7 @@ return context.asJSON({\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>title=None, uid=None, page=0</string> </value> <value> <string>query=None, uid=None, page=0</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts22218499.86</string> </value> <value> <string>ts22232696.03</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -110,7 +110,7 @@ function drawSoftwareReleaseList(data) {\n ...@@ -110,7 +110,7 @@ function drawSoftwareReleaseList(data) {\n
navigation_div.attr(\'id\', \'navigation_div\');\n navigation_div.attr(\'id\', \'navigation_div\');\n
navigation_div.addClass(\'software_release_more\');\n navigation_div.addClass(\'software_release_more\');\n
var param = {};\n var param = {};\n
if (data.title) { param[\'query\'] = data.title; }\n if (data.query) { param[\'query\'] = data.query; }\n
var a = $(\'<div>\');\n var a = $(\'<div>\');\n
page = parseInt(data.page, 10);\n page = parseInt(data.page, 10);\n
if (data.after) {\n if (data.after) {\n
...@@ -126,7 +126,7 @@ function drawSoftwareReleaseList(data) {\n ...@@ -126,7 +126,7 @@ function drawSoftwareReleaseList(data) {\n
navigation_div.append(p);\n navigation_div.append(p);\n
var a = $(\'<div>\');\n var a = $(\'<div>\');\n
var param = {};\n var param = {};\n
if (data.title) { param[\'query\'] = data.title; }\n if (data.query) { param[\'query\'] = data.query; }\n
if (data.before) {\n if (data.before) {\n
param[\'page\'] = page-1;\n param[\'page\'] = page-1;\n
a.addClass(\'sr_left_active\');\n a.addClass(\'sr_left_active\');\n
...@@ -174,7 +174,7 @@ function softwareReleaseController(query, page) {\n ...@@ -174,7 +174,7 @@ function softwareReleaseController(query, page) {\n
js_container.append(software_release_container);\n js_container.append(software_release_container);\n
search.click(searchSoftwareReleaseList);\n search.click(searchSoftwareReleaseList);\n
var q = {}\n var q = {}\n
if (query) { q[\'title\'] = query }\n if (query) { q[\'query\'] = query }\n
if (page) {q[\'page\'] = page}\n if (page) {q[\'page\'] = page}\n
else {q[\'page\'] = 0}\n else {q[\'page\'] = 0}\n
$.getJSON(vifib[\'site_url\'] + "/ERP5Site_getSoftwareReleaseListAsJSON", q,\n $.getJSON(vifib[\'site_url\'] + "/ERP5Site_getSoftwareReleaseListAsJSON", q,\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