Commit 8100cda2 authored by Kevin Deldycke's avatar Kevin Deldycke

Include sub-section as part of the document list.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8113 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c5411dce
...@@ -99,7 +99,7 @@ else:\n ...@@ -99,7 +99,7 @@ else:\n
# Make a new search with local documents\n # Make a new search with local documents\n
value_list = context.getSourceValueList(portal_type="Web Page")\n value_list = context.getSourceValueList(portal_type="Web Page")\n
if len(value_list):\n if len(value_list):\n
reference_list = map(lambda x:x.getReference(), value_list)\n reference_list = map(lambda x: x.getReference(), value_list)\n
brain_list.extend(list(context.portal_catalog(reference= reference_list, portal_type="Web Page")))\n brain_list.extend(list(context.portal_catalog(reference= reference_list, portal_type="Web Page")))\n
\n \n
# Make sure a single reference is counted once only\n # Make sure a single reference is counted once only\n
...@@ -124,7 +124,10 @@ brain_list = brain_dict.values() + none_list\n ...@@ -124,7 +124,10 @@ brain_list = brain_dict.values() + none_list\n
# Sort documents\n # Sort documents\n
brain_list.sort(content_cmp)\n brain_list.sort(content_cmp)\n
\n \n
return brain_list\n # Append sub-section to the top of the list\n
subsection_list = context.objectValues(portal_type="Web Section")\n
\n
return subsection_list + brain_list\n
]]></string> </value> ]]></string> </value>
...@@ -139,10 +142,24 @@ return brain_list\n ...@@ -139,10 +142,24 @@ return brain_list\n
<key> <string>_filepath</string> </key> <key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDocumentValueList</string> </value> <value> <string>Script (Python):/nexedi/portal_skins/erp5_web/WebSite_getDocumentValueList</string> </value>
</item> </item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>**kw</string> </value> <value> <string>**kw</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <value>
...@@ -190,6 +207,7 @@ return brain_list\n ...@@ -190,6 +207,7 @@ return brain_list\n
<string>None</string> <string>None</string>
<string>reference</string> <string>reference</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>subsection_list</string>
</tuple> </tuple>
</value> </value>
</item> </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