[Erp5-report] r29515 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 9 12:09:14 CEST 2009


Author: romain
Date: Fri Oct  9 12:09:13 2009
New Revision: 29515

URL: http://svn.erp5.org?rev=29515&view=rev
Log:
Base_showFoundText should not raise NotConvertedError when document is not converted. Instead, it should display a message ("This document is not converted yet.")

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml?rev=29515&r1=29514&r2=29515&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml [utf8] Fri Oct  9 12:09:13 2009
@@ -61,6 +61,7 @@
   containing searched words as well highlighting the searched \n
   words in the text itself.\n
 """\n
+from Products.ERP5.Document.Document import NotConvertedError\n
 \n
 is_gadget_mode = context.REQUEST.get(\'is_gadget_mode\', 0)\n
 \n
@@ -89,7 +90,10 @@
                   \'searchabletext_phrase\',)\n
 \n
 if document_text is None:\n
-  document_text = context.getSearchableText()\n
+  try:\n
+    document_text = context.getSearchableText()\n
+  except NotConvertedError:\n
+    return context.Base_translateString("This document is not converted yet.")\n
 \n
 if selection is not None:\n
   params = selection.getParams()\n
@@ -166,6 +170,8 @@
                             <string>selection</string>
                             <string>max_lines</string>
                             <string>max_text_length</string>
+                            <string>Products.ERP5.Document.Document</string>
+                            <string>NotConvertedError</string>
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>is_gadget_mode</string>

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=29515&r1=29514&r2=29515&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Fri Oct  9 12:09:13 2009
@@ -1,1 +1,1 @@
-1326
+1327




More information about the Erp5-report mailing list