Commit f9d49990 authored by Mayoro Diagne's avatar Mayoro Diagne

2010-06-26 mayoro

* correct previous commit, use contentValues because  of caching method

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36621 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7c9caafc
...@@ -65,13 +65,14 @@ file_type_list = (\'Image\', \'File\')\n ...@@ -65,13 +65,14 @@ file_type_list = (\'Image\', \'File\')\n
sub_form_type_list = filter(lambda x: x not in file_type_list, type_list)\n sub_form_type_list = filter(lambda x: x not in file_type_list, type_list)\n
\n \n
# A simple solution: use title to group\n # A simple solution: use title to group\n
viewable_content_list = [x.getObject() for x in context.searchFolder(validation_state = [\'embedded\',\'draft\'])]\n viewable_content_list = context.contentValues(portal_type=type_list, checked_permission=\'View\',validation_state = \'embedded\')\n
\n \n
content_group_dict = {}\n content_group_dict = {}\n
for content in viewable_content_list:\n for content in viewable_content_list:\n
title = content.getTitle()\n if content.getValidationState() in [\'embedded\',\'draft\']:\n
content_group_dict.setdefault(title, [])\n title = content.getTitle()\n
content_group_dict[title].append(content)\n content_group_dict.setdefault(title, [])\n
content_group_dict[title].append(content)\n
\n \n
# Now sort every group by creation date (to be done)\n # Now sort every group by creation date (to be done)\n
# XXXX\n # XXXX\n
...@@ -137,6 +138,14 @@ return result\n ...@@ -137,6 +138,14 @@ return result\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string></string> </value> <value> <string></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>
...@@ -170,12 +179,9 @@ return result\n ...@@ -170,12 +179,9 @@ return result\n
<string>file_type_list</string> <string>file_type_list</string>
<string>filter</string> <string>filter</string>
<string>sub_form_type_list</string> <string>sub_form_type_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
<string>viewable_content_list</string> <string>viewable_content_list</string>
<string>content_group_dict</string> <string>content_group_dict</string>
<string>_getiter_</string>
<string>content</string> <string>content</string>
<string>title</string> <string>title</string>
<string>_getitem_</string> <string>_getitem_</string>
......
2010-06-26 mayoro
* correct previous commit, use contentValues because of caching method
2010-06-26 mayoro 2010-06-26 mayoro
* Add erp5_html_compatibility in EGov registered skin selection, needed for form_view_dialog * Add erp5_html_compatibility in EGov registered skin selection, needed for form_view_dialog
* Use catalog to search for attachments * Use catalog to search for attachments
......
645 652
\ 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