[Erp5-report] r36305 jerome - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jun 14 13:36:41 CEST 2010
Author: jerome
Date: Mon Jun 14 13:36:38 2010
New Revision: 36305
URL: http://svn.erp5.org?rev=36305&view=rev
Log:
fix Documents tab, it was showing all documents when context had no follow up related documents, and it was generating invalid HTML links
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/File_getDownloadUrl.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml?rev=36305&r1=36304&r2=36305&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getRelatedDocumentList.xml [utf8] Mon Jun 14 13:36:38 2010
@@ -60,10 +60,14 @@ portal_catalog=context.getPortalObject()
follow_up_related_document_list = portal_catalog(\n
portal_type=portal_type,\n
follow_up_uid=context.getUid(), **kw)\n
-kw[\'query\'] = ComplexQuery(\n
- Query(relative_url=\'%s/%%\' % context.getRelativeUrl()),\n
- Query(uid=[x.getUid() for x in follow_up_related_document_list]),\n
- operator=\'or\')\n
+\n
+kw[\'query\'] = Query(relative_url=\'%s/%%\' % context.getRelativeUrl())\n
+if follow_up_related_document_list:\n
+ kw[\'query\'] = ComplexQuery(\n
+ kw[\'query\'],\n
+ Query(uid=[x.getUid() for x in follow_up_related_document_list]),\n
+ operator=\'or\')\n
+\n
return portal_catalog(portal_type=portal_type, **kw)\n
</string> </value>
</item>
@@ -112,11 +116,12 @@ return portal_catalog(portal_type=portal
<string>portal_catalog</string>
<string>_apply_</string>
<string>follow_up_related_document_list</string>
+ <string>_write_</string>
+ <string>_getitem_</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
- <string>_write_</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/File_getDownloadUrl.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/File_getDownloadUrl.xml?rev=36305&r1=36304&r2=36305&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/File_getDownloadUrl.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/File_getDownloadUrl.xml [utf8] Mon Jun 14 13:36:38 2010
@@ -53,21 +53,9 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>from ZTUtils import make_query\n
-\n
-index = context.portal_selections.getSelectionIndexFor(selection_name)\n
-object = brain.getObject()\n
-if object is None:\n
- return None\n
-\n
-url = object.absolute_url()\n
-method = \'Base_download\'\n
-kw = { \n
- \'selection_name\' : selection_name,\n
- \'selection_index\' : index,\n
- }\n
-\n
-return url + \'/\' + method + \'?\' + make_query(kw)\n
+ <value> <string>if brain is None:\n
+ brain = context\n
+return \'%s/Base_download\' % brain.absolute_url()\n
</string> </value>
</item>
<item>
@@ -107,16 +95,9 @@ return url + \'/\' + method + \'?\' + ma
<string>brain</string>
<string>selection</string>
<string>selection_name</string>
- <string>ZTUtils</string>
- <string>make_query</string>
- <string>_getattr_</string>
- <string>context</string>
- <string>index</string>
- <string>object</string>
<string>None</string>
- <string>url</string>
- <string>method</string>
- <string>kw</string>
+ <string>context</string>
+ <string>_getattr_</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=36305&r1=36304&r2=36305&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Mon Jun 14 13:36:38 2010
@@ -1 +1 @@
-1611
+1612
\ No newline at end of file
More information about the Erp5-report
mailing list