Commit 668944a5 authored by Fabien Morin's avatar Fabien Morin

sort results by effective date

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39586 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a5b3417
...@@ -68,7 +68,7 @@ request = container.REQUEST\n ...@@ -68,7 +68,7 @@ request = container.REQUEST\n
requested_tag = request.get(\'tag\') # XXX-JPS it would be better to use subject which is the normal term in ERP5\n requested_tag = request.get(\'tag\') # XXX-JPS it would be better to use subject which is the normal term in ERP5\n
current_section = context.getWebSectionValue()\n current_section = context.getWebSectionValue()\n
result = []\n result = []\n
for item in current_section.WebSection_getDocumentValueList(): # XXX-JPS this could be way too slow\n for item in current_section.WebSection_getDocumentValueList(**kw): # XXX-JPS this could be way too slow\n
if requested_tag is not None:\n if requested_tag is not None:\n
if requested_tag in item.getSubjectList():\n if requested_tag in item.getSubjectList():\n
result.append(item)\n result.append(item)\n
...@@ -121,6 +121,7 @@ return result\n ...@@ -121,6 +121,7 @@ return result\n
<string>current_section</string> <string>current_section</string>
<string>result</string> <string>result</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>_apply_</string>
<string>item</string> <string>item</string>
<string>None</string> <string>None</string>
</tuple> </tuple>
......
...@@ -429,12 +429,7 @@ ...@@ -429,12 +429,7 @@
<item> <item>
<key> <string>editable_columns</string> </key> <key> <string>editable_columns</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>effective_date</string>
<string>effective_date</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -532,7 +527,12 @@ ...@@ -532,7 +527,12 @@
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>effective_date</string>
<string>descending</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
......
51 52
\ 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