Commit 96940308 authored by Bartek Górny's avatar Bartek Górny

a HUGE commit after a major refactoring; use with caution.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12353 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 48c50120
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.ActionInformation</string>
<string>ActionInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>contribute_content</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>Modify portal content</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Contribute Content</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ContributionTool_viewContributeFileDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.ActionInformation</string>
<string>ActionInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>latest</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Latest</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ContributionTool_viewLatestContentList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.ActionInformation</string>
<string>ActionInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/ContributionTool_viewMyContentList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
</item> </item>
<item> <item>
<key> <string>priority</string> </key> <key> <string>priority</string> </key>
<value> <float>2.0</float> </value> <value> <float>4.0</float> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Document Search</string> </value> <value> <string>Advanced Search</string> </value>
</item> </item>
<item> <item>
<key> <string>visible</string> </key> <key> <string>visible</string> </key>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_searchDialog</string> </value> <value> <string>string:${object_url}/Base_viewAdvancedSearchDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.ActionInformation</string>
<string>ActionInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_search</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>search</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>2.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Document Search</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_viewSearchDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -86,4 +88,23 @@ ...@@ -86,4 +88,23 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:object.hasFile()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/File_UploadDialog</string> </value> <value> <string>string:${object_url}/File_viewUploadDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_htmlRepresentation</string> </value> <value> <string>string:${object_url}/Document_viewHTMLPreview</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_jumpToRelatedDocuments?what=all</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=all&listbox_title=All related documents
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_jumpToRelatedDocuments?what=related_predecessor</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=related_predecessor&listbox_title=Reference documents
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_jumpToRelatedDocuments?what=related_similar</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=related_similar&listbox_title=Similar documents
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_jumpToRelatedDocuments?what=cloud</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=cloud&listbox_title=Similarity Cloud
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_jumpToRelatedDocuments?what=related_successor</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=related_successor&listbox_title=Related documents
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_jumpToRelatedDocuments?what=wiki_predecessor</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=wiki_predecessor&listbox_title=Wiki predecessors
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_jumpToRelatedDocuments?what=wiki_successor</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=wiki_successor&listbox_title=Wiki successors
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_viewLocalPermission</string> </value> <value> <string>string:${object_url}/Base_viewLocalPermissionList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Preference_viewDMS</string> </value> <value> <string>string:${object_url}/Preference_viewDocument</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_convert</string> </value> <value> <string>string:${object_url}/OOoDocument_convertToBase</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_downloadDialog</string> </value> <value> <string>string:${object_url}/OOoDocument_viewDownloadDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_getOOoFileDialog</string> </value> <value> <string>string:${object_url}/OOoDocument_viewOOoFileDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_getSnapshotDialog</string> </value> <value> <string>string:${object_url}/OOoDocument_viewSnapshotDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_viewTargetFileDialog</string> </value> <value> <string>string:${object_url}/OOoDocument_viewConvertDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/File_UploadDialog</string> </value> <value> <string>string:${object_url}/File_viewUploadDialog</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Document_jumpToRelatedDocumentList?what=all</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=all&listbox_title=All related documents
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Document_jumpToRelatedDocumentList?what=related_predecessor</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=related_predecessor&listbox_title=Reference documents
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Document_jumpToRelatedDocumentList?what=related_similar</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=related_similar&listbox_title=Similar documents
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Document_jumpToRelatedDocumentList?what=cloud</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=cloud&listbox_title=Similarity Cloud
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Document_jumpToRelatedDocumentList?what=related_successor</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=related_successor&listbox_title=Related documents
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Document_jumpToRelatedDocumentList?what=wiki_predecessor</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=wiki_predecessor&listbox_title=Wiki predecessors
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,11 @@ ...@@ -81,7 +81,11 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Document_jumpToRelatedDocumentList?what=wiki_successor</string> </value> <value> <string encoding="cdata"><![CDATA[
string:${object_url}/Document_jumpToRelatedDocumentList?relation_id=wiki_successor&listbox_title=Wiki successors
]]></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>text</string> </key> <key> <string>text</string> </key>
<value> <string>string:${object_url}/Base_viewLocalPermission</string> </value> <value> <string>string:${object_url}/Base_viewLocalPermissionList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -140,6 +140,12 @@ ...@@ -140,6 +140,12 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>revision</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>short_title</string> </key> <key> <string>short_title</string> </key>
<value> <value>
...@@ -171,28 +177,29 @@ ...@@ -171,28 +177,29 @@
<key> <string>_keys</string> </key> <key> <string>_keys</string> </key>
<value> <value>
<list> <list>
<string>uid</string> <string>uid</string>
<string>Creator</string> <string>Creator</string>
<string>Date</string> <string>Date</string>
<string>PrincipiaSearchSource</string> <string>PrincipiaSearchSource</string>
<string>SearchableText</string> <string>SearchableText</string>
<string>CreationDate</string> <string>CreationDate</string>
<string>EffectiveDate</string> <string>EffectiveDate</string>
<string>ExpiresDate</string> <string>ExpiresDate</string>
<string>ModificationDate</string> <string>ModificationDate</string>
<string>Type</string> <string>Type</string>
<string>bobobase_modification_time</string> <string>bobobase_modification_time</string>
<string>created</string> <string>created</string>
<string>effective</string> <string>effective</string>
<string>expires</string> <string>expires</string>
<string>getIcon</string> <string>getIcon</string>
<string>in_reply_to</string> <string>in_reply_to</string>
<string>modified</string> <string>modified</string>
<string>review_state</string> <string>review_state</string>
<string>summary</string> <string>summary</string>
<string>language</string> <string>language</string>
<string>version</string> <string>version</string>
<string>short_title</string> <string>revision</string>
<string>short_title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -230,6 +237,7 @@ review_state\r\n ...@@ -230,6 +237,7 @@ review_state\r\n
summary\r\n summary\r\n
language\r\n language\r\n
version\r\n version\r\n
revision\r\n
short_title</string> </value> short_title</string> </value>
</item> </item>
<item> <item>
...@@ -296,7 +304,8 @@ VALUES\n ...@@ -296,7 +304,8 @@ VALUES\n
<dtml-sqlvar expr="summary[loop_item]" type="string" optional>,\n <dtml-sqlvar expr="summary[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="language[loop_item]" type="string" optional>,\n <dtml-sqlvar expr="language[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="version[loop_item]" type="string" optional>,\n <dtml-sqlvar expr="version[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="short_title[loop_item]" type="string" optional>\n <dtml-sqlvar expr="short_title[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="revision[loop_item]" type="string" optional>\n
)\n )\n
<dtml-if sequence-end>\n <dtml-if sequence-end>\n
<dtml-else>\n <dtml-else>\n
...@@ -367,7 +376,8 @@ VALUES\n ...@@ -367,7 +376,8 @@ VALUES\n
<dtml-sqlvar expr="summary[loop_item]" type="string" optional>,\n <dtml-sqlvar expr="summary[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="language[loop_item]" type="string" optional>,\n <dtml-sqlvar expr="language[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="version[loop_item]" type="string" optional>,\n <dtml-sqlvar expr="version[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="short_title[loop_item]" type="string" optional>\n <dtml-sqlvar expr="short_title[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="revision[loop_item]" type="string" optional>\n
)\n )\n
<dtml-if sequence-end>\n <dtml-if sequence-end>\n
<dtml-else>\n <dtml-else>\n
......
...@@ -123,6 +123,7 @@ CREATE TABLE `compatibility` (\n ...@@ -123,6 +123,7 @@ CREATE TABLE `compatibility` (\n
`summary` text,\n `summary` text,\n
`language` varchar(5) default \'\',\n `language` varchar(5) default \'\',\n
`version` varchar(10) default \'\',\n `version` varchar(10) default \'\',\n
`revision` varchar(10) default \'\',\n
`short_title` varchar(100) default \'\',\n `short_title` varchar(100) default \'\',\n
PRIMARY KEY (`uid`),\n PRIMARY KEY (`uid`),\n
KEY `Type` (`Type`),\n KEY `Type` (`Type`),\n
...@@ -188,6 +189,7 @@ CREATE TABLE `compatibility` (\n ...@@ -188,6 +189,7 @@ CREATE TABLE `compatibility` (\n
`summary` text,\n `summary` text,\n
`language` varchar(5) default \'\',\n `language` varchar(5) default \'\',\n
`version` varchar(10) default \'\',\n `version` varchar(10) default \'\',\n
`revision` varchar(10) default \'\',\n
`short_title` varchar(100) default \'\',\n `short_title` varchar(100) default \'\',\n
PRIMARY KEY (`uid`),\n PRIMARY KEY (`uid`),\n
KEY `Type` (`Type`),\n KEY `Type` (`Type`),\n
......
...@@ -31,39 +31,143 @@ ...@@ -31,39 +31,143 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>_tree</string> </key>
<value> <value>
<none/> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>_tree</string> </key> <key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <tuple/>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>acquisition_portal_type</string> </key> <key> <string>acquisition_portal_type</string> </key>
<value> <string>python: []</string> </value> <value> <string>python: []</string> </value>
</item> </item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value> <value>
<none/> <tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>classification</string> </value> <value> <string>classification</string> </value>
</item> </item>
<item>
<key> <string>id_generator</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id_group</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>last_id</string> </key> <key> <string>last_id</string> </key>
<value> <string>1</string> </value> <value> <string>1</string> </value>
</item> </item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value> <value> <string>Base Category</string> </value>
</item> </item>
<item>
<key> <string>read_permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>rid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Security Classification</string> </value> <value> <string>Security Classification</string> </value>
...@@ -74,6 +178,12 @@ ...@@ -74,6 +178,12 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>write_permission</string> </key>
<value>
<none/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -82,5 +82,5 @@ def asSecurityGroupIdList(self, category_order=None, **kw): ...@@ -82,5 +82,5 @@ def asSecurityGroupIdList(self, category_order=None, **kw):
#LOG('asSecurityGroupIdList, result',0,['_'.join(x) for x in getCombinationList(code_list) if len(x)]) #LOG('asSecurityGroupIdList, result',0,['_'.join(x) for x in getCombinationList(code_list) if len(x)])
#return ['_'.join(x) for x in getCombinationList(code_list) if len(x)] #return ['_'.join(x) for x in getCombinationList(code_list) if len(x)]
#LOG('asSecurityGroupIdList', 0, 'return full_code_list = %s' %(full_code_list,)) #LOG('asSecurityGroupIdList', 0, 'return full_code_list = %s' %(full_code_list,))
#self.log('full_code_list',full_code_list) self.log('full_code_list',full_code_list)
return full_code_list return full_code_list
...@@ -3,46 +3,64 @@ import xmlrpclib, base64 ...@@ -3,46 +3,64 @@ import xmlrpclib, base64
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
def extractContent(data): def extractContent(data):
cs=cStringIO.StringIO() """
extract text content from ODF data
directly by unzipping (no need for oood here)
"""
# XXX probably not used - to really get text content it should
# strip xml too
cs = cStringIO.StringIO()
cs.write(data) cs.write(data)
try: try:
z=zipfile.ZipFile(cs) z = zipfile.ZipFile(cs)
except zipfile.BadZipfile: except zipfile.BadZipfile:
cs.close() cs.close()
return '' return ''
s=z.read('content.xml') s = z.read('content.xml')
cs.close() cs.close()
z.close() z.close()
return s return s
def convertToOdf(self,name,data): ###### XXX these methods repeat what is in OOoDocument class
sp=mkProxy(self) # maybe redundant, but we need to access them from Script (Python)
kw=sp.run_convert(name,base64.encodestring(data))
odf=base64.decodestring(kw['data']) def convertToOdf(self, name, data):
"""
convert data into ODF format
to be used in ingestion when we don't yet have an ERP5 object
to work with (and we for example have to figure out portal_type)
"""
sp = mkProxy(self)
kw = sp.run_convert(name,base64.encodestring(data))
odf = base64.decodestring(kw['data'])
return odf return odf
def mkProxy(self): def mkProxy(self):
pref=getToolByName(self,'portal_preferences') pref = getToolByName(self,'portal_preferences')
adr=pref.getPreferredDmsOoodocServerAddress() adr = pref.getPreferredDmsOoodocServerAddress()
nr=pref.getPreferredDmsOoodocServerPortNumber() nr = pref.getPreferredDmsOoodocServerPortNumber()
if adr is None or nr is None: if adr is None or nr is None:
raise Exception('you should set conversion server coordinates in preferences') raise Exception('you should set conversion server coordinates in preferences')
sp=xmlrpclib.ServerProxy('http://%s:%d' % (adr,nr),allow_none=True) sp = xmlrpclib.ServerProxy('http://%s:%d' % (adr,nr), allow_none=True)
return sp return sp
def generateFile(self,name,data,format): def generateFile(self, name, data, format):
sp=mkProxy(self) sp = mkProxy(self)
kw=sp.run_generate(name,data,None,format) kw = sp.run_generate(name, data, None, format)
res=base64.decodestring(kw['data']) res = base64.decodestring(kw['data'])
return res return res
def getAttrFromFilename(self,fname): def getAttrFromFilename(self, fname):
rx_parse=re.compile(self.portal_preferences.getPreferredDmsFilenameRegexp()) """
m=rx_parse.match(fname) parse file name using regexp specified in preferences
"""
rx_parse = re.compile(self.portal_preferences.getPreferredDmsFilenameRegexp())
m = rx_parse.match(fname)
if m is None: if m is None:
return {} return {}
return m.groupdict() return m.groupdict()
def ofof(one, another):
return one.__of__(another)
# vim: syntax=python shiftwidth=2 # vim: syntax=python shiftwidth=2
import re import re
def findAddress(txt): def findAddress(txt):
"""
find email address in a string
"""
validchars='0-9A-Za-z.\-_' validchars='0-9A-Za-z.\-_'
r=re.compile('[%s]+@[%s]+' % (validchars,validchars)) r=re.compile('[%s]+@[%s]+' % (validchars,validchars))
m=r.search(txt) m=r.search(txt)
return m and m.group() return m and m.group()
def extractParams(txt): def extractParams(txt):
"""
extract parameters given in mail body
We assume that parameters are given as lines of the format:
name:value
"""
r=re.compile('^([\w_]+):([\w_/]+)$') r=re.compile('^([\w_]+):([\w_/]+)$')
res=[] res=[]
for line in txt.split(): for line in txt.split():
......
''' """
RULES RULES
Single arguments: Single arguments:
...@@ -15,8 +15,15 @@ Multiple arguments: ...@@ -15,8 +15,15 @@ Multiple arguments:
- state (simulation_state), type (portal_type) - state (simulation_state), type (portal_type)
Everything else is treated as SearchableText Everything else is treated as SearchableText
''' """
# XXX score:
# pythonicity: high
# obfuscation level: brain-twisting
# how to customize:
# (1) think for two hours
# (2) type for 20 seconds
import re import re
import sys import sys
...@@ -24,10 +31,14 @@ sys.path.append('/usr/lib/zope/lib/python/') ...@@ -24,10 +31,14 @@ sys.path.append('/usr/lib/zope/lib/python/')
from DateTime import DateTime from DateTime import DateTime
def dateRangeProc(s): def dateRangeProc(s):
m=re.match('(\d)([my]).*',s) """
process date range (can be given in months or years)
"""
m=re.match('(\d)([wmy]).*',s)
try: try:
dif=0 dif=0
gr=m.groups() gr=m.groups()
if gr[1]=='w':dif=int(gr[0])*7
if gr[1]=='m':dif=int(gr[0])*30 if gr[1]=='m':dif=int(gr[0])*30
if gr[1]=='y':dif=int(gr[0])*365 if gr[1]=='y':dif=int(gr[0])*365
return ('creation_from',DateTime()-dif) return ('creation_from',DateTime()-dif)
......
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
<property id='description'>Policy: */project <property id='description'>Policy: */project
Rule: all project members have a right to access document once it has been shared or released</property> Rule: all project members have a right to access document once it has been shared or released</property>
<property id='condition'>python:object.Document_policyApplies('*/project')</property> <property id='condition'>python:object.Document_policyApplies('*/project')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property> <multi_property id='base_category'>source_project</multi_property>
</role> </role>
<role id='Assignor'> <role id='Assignor'>
...@@ -14,7 +13,7 @@ Rule: all project members have a right to access document once it has been share ...@@ -14,7 +13,7 @@ Rule: all project members have a right to access document once it has been share
<property id='description'>Policy: */project <property id='description'>Policy: */project
Rule: project director is an Assignor (has management rights to the doc - can review it, release, publish, add local roles)</property> Rule: project director is an Assignor (has management rights to the doc - can review it, release, publish, add local roles)</property>
<property id='condition'>python:object.Document_policyApplies('*/project')</property> <property id='condition'>python:object.Document_policyApplies('*/project')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'>function/knowledge/manager</multi_property> <multi_property id='category'>function/knowledge/manager</multi_property>
<multi_property id='base_category'>function</multi_property> <multi_property id='base_category'>function</multi_property>
...@@ -24,9 +23,8 @@ Rule: project director is an Assignor (has management rights to the doc - can re ...@@ -24,9 +23,8 @@ Rule: project director is an Assignor (has management rights to the doc - can re
<property id='title'>Owner</property> <property id='title'>Owner</property>
<property id='description'>Policy: */* <property id='description'>Policy: */*
Rule: the creator is Assignee - can edit the doc and submit it</property> Rule: the creator is Assignee - can edit the doc and submit it</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromUser</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromUser</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>reference</multi_property> <multi_property id='base_category'>reference</multi_property>
</role> </role>
<role id='Auditor'> <role id='Auditor'>
...@@ -35,9 +33,8 @@ Rule: the creator is Assignee - can edit the doc and submit it</property> ...@@ -35,9 +33,8 @@ Rule: the creator is Assignee - can edit the doc and submit it</property>
Rule: all people working for the same organisation are Auditors (we identify the organisation by the first part of the "group" path) Rule: all people working for the same organisation are Auditors (we identify the organisation by the first part of the "group" path)
This does not apply if it is a project document and does not have a project</property> This does not apply if it is a project document and does not have a project</property>
<property id='condition'>python: not object.Document_policyApplies('*/restricted') and (object.Document_policyApplies('*/project') or not object.Document_policyApplies('*/project',True) )</property> <property id='condition'>python: not object.Document_policyApplies('*/restricted') and (object.Document_policyApplies('*/project') or not object.Document_policyApplies('*/project',True) )</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryRoot</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryRoot</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
</role> </role>
<role id='Assignee'> <role id='Assignee'>
...@@ -45,9 +42,8 @@ This does not apply if it is a project document and does not have a project</pro ...@@ -45,9 +42,8 @@ This does not apply if it is a project document and does not have a project</pro
<property id='description'>Policy: collaborative/project <property id='description'>Policy: collaborative/project
Rule: all members of project team can edit the document before it is submitted, and can submit it</property> Rule: all members of project team can edit the document before it is submitted, and can submit it</property>
<property id='condition'>python:object.Document_policyApplies('collaborative/project')</property> <property id='condition'>python:object.Document_policyApplies('collaborative/project')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromArrow</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>source_project</multi_property> <multi_property id='base_category'>source_project</multi_property>
</role> </role>
<role id='Assignor'> <role id='Assignor'>
...@@ -55,7 +51,7 @@ Rule: all members of project team can edit the document before it is submitted, ...@@ -55,7 +51,7 @@ Rule: all members of project team can edit the document before it is submitted,
<property id='description'>Policy: */team <property id='description'>Policy: */team
Rule: team manager is an Assignor (has management rights to the doc - can review it, release, publish, add local roles)</property> Rule: team manager is an Assignor (has management rights to the doc - can review it, release, publish, add local roles)</property>
<property id='condition'>python:object.Document_policyApplies('*/team')</property> <property id='condition'>python:object.Document_policyApplies('*/team')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property>
<multi_property id='category'>function/auc/department/director_of_department</multi_property> <multi_property id='category'>function/auc/department/director_of_department</multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
...@@ -66,7 +62,7 @@ Rule: team manager is an Assignor (has management rights to the doc - can review ...@@ -66,7 +62,7 @@ Rule: team manager is an Assignor (has management rights to the doc - can review
<property id='description'>Policy: */team <property id='description'>Policy: */team
Rule: team manager is an Assignor (has management rights to the doc - can review it, release, publish, add local roles)</property> Rule: team manager is an Assignor (has management rights to the doc - can review it, release, publish, add local roles)</property>
<property id='condition'>python:object.Document_policyApplies('*/team')</property> <property id='condition'>python:object.Document_policyApplies('*/team')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property>
<multi_property id='category'>function/auc/department/deputy_director_of_department</multi_property> <multi_property id='category'>function/auc/department/deputy_director_of_department</multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
...@@ -77,9 +73,8 @@ Rule: team manager is an Assignor (has management rights to the doc - can review ...@@ -77,9 +73,8 @@ Rule: team manager is an Assignor (has management rights to the doc - can review
<property id='description'>Policy: */team <property id='description'>Policy: */team
Rule: all team members have a right to access document once it has been shared or released</property> Rule: all team members have a right to access document once it has been shared or released</property>
<property id='condition'>python:object.Document_policyApplies('*/team')</property> <property id='condition'>python:object.Document_policyApplies('*/team')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
</role> </role>
<role id='Assignee'> <role id='Assignee'>
...@@ -87,9 +82,8 @@ Rule: all team members have a right to access document once it has been shared o ...@@ -87,9 +82,8 @@ Rule: all team members have a right to access document once it has been shared o
<property id='description'>Policy: collaborative/team <property id='description'>Policy: collaborative/team
Rule: all members of the team can edit the document before it is submitted, and can submit it</property> Rule: all members of the team can edit the document before it is submitted, and can submit it</property>
<property id='condition'>python:object.Document_policyApplies('collaborative/team')</property> <property id='condition'>python:object.Document_policyApplies('collaborative/team')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
</role> </role>
<role id='Assignee'> <role id='Assignee'>
...@@ -97,9 +91,8 @@ Rule: all members of the team can edit the document before it is submitted, and ...@@ -97,9 +91,8 @@ Rule: all members of the team can edit the document before it is submitted, and
<property id='description'>Policy: collaborative/public <property id='description'>Policy: collaborative/public
Rule: everyone in the organisation (root group) can edit the doc before it is submitted, and can suggest its publication</property> Rule: everyone in the organisation (root group) can edit the doc before it is submitted, and can suggest its publication</property>
<property id='condition'>python:object.Document_policyApplies('collaborative/public')</property> <property id='condition'>python:object.Document_policyApplies('collaborative/public')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryRoot</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryRoot</property>
<multi_property id='category'></multi_property>
<multi_property id='base_category'>group</multi_property> <multi_property id='base_category'>group</multi_property>
</role> </role>
<role id='Assignor'> <role id='Assignor'>
...@@ -107,7 +100,7 @@ Rule: everyone in the organisation (root group) can edit the doc before it is su ...@@ -107,7 +100,7 @@ Rule: everyone in the organisation (root group) can edit the doc before it is su
<property id='description'>Policy: collaborative/public <property id='description'>Policy: collaborative/public
Rule: any person with knowledge/manager role can publish the document and manage access rights to it</property> Rule: any person with knowledge/manager role can publish the document and manage access rights to it</property>
<property id='condition'>python:object.Document_policyApplies('collaborative/public')</property> <property id='condition'>python:object.Document_policyApplies('collaborative/public')</property>
<property id='priority'>10</property> <property id='priority'>10.0</property>
<property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property> <property id='base_category_script'>ERP5Type_getSecurityCategoryFromAssignment</property>
<multi_property id='category'>function/knowledge/manager</multi_property> <multi_property id='category'>function/knowledge/manager</multi_property>
<multi_property id='base_category'>function</multi_property> <multi_property id='base_category'>function</multi_property>
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.ERP5.Interaction</string> <string>Products.ERP5Type.ERP5Type</string>
<string>InteractionDefinition</string> <string>ERP5TypeInformation</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
...@@ -19,79 +19,98 @@ ...@@ -19,79 +19,98 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>actbox_category</string> </key> <key> <string>_actions</string> </key>
<value> <string>workflow</string> </value> <value>
<tuple/>
</value>
</item> </item>
<item> <item>
<key> <string>actbox_name</string> </key> <key> <string>_aliases</string> </key>
<value> <string></string> </value> <value>
<dictionary/>
</value>
</item> </item>
<item> <item>
<key> <string>actbox_url</string> </key> <key> <string>_owner</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>activate_script_name</string> </key> <key> <string>_roles</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>allowed_content_types</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>base_category_list</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>content_meta_type</string> </key>
<value> <string>ERP5 Folder</string> </value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string>Contribution Tool provides a single place to contribue content to an ERP5 Site.</string> </value>
</item> </item>
<item> <item>
<key> <string>guard</string> </key> <key> <string>factory</string> </key>
<value> <value> <string>addFolder</string> </value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>filter_content_types</string> </key>
<value> <string>Registered_file_edit</string> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>method_id</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<list> <tuple/>
<string>_edit</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_filter</string> </key> <key> <string>hidden_content_type_list</string> </key>
<value> <value>
<list> <tuple/>
<string>Drawing</string>
<string>Image</string>
<string>PDF</string>
<string>Presentation</string>
<string>Spreadsheet</string>
<string>Text</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>id</string> </key>
<value> <value> <string>Contribution Tool</string> </value>
<list>
<string>CheckKnownType</string>
</list>
</value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>init_script</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>trigger_type</string> </key> <key> <string>permission</string> </key>
<value> <int>2</int> </value> <value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Contribution Tool</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -75,7 +75,9 @@ ...@@ -75,7 +75,9 @@
<item> <item>
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<tuple/> <tuple>
<string>document</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
</item> </item>
<item> <item>
<key> <string>factory</string> </key> <key> <string>factory</string> </key>
<value> <string>addPDF</string> </value> <value> <string>addPDFDocument</string> </value>
</item> </item>
<item> <item>
<key> <string>filter_content_types</string> </key> <key> <string>filter_content_types</string> </key>
...@@ -76,9 +76,7 @@ ...@@ -76,9 +76,7 @@
<item> <item>
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<tuple> <tuple/>
<string>dms_document</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<tuple> <tuple>
<string>dms_document</string> <string>document</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<tuple> <tuple>
<string>dms_document</string> <string>document</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</chain> </chain>
<chain> <chain>
<type>External Web Page</type> <type>External Web Page</type>
<workflow>edit_workflow, external_document_publication_workflow, external_document_interaction_workflow</workflow> <workflow>edit_workflow, external_processing_workflow, external_document_interaction_workflow, external_document_publication_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>File</type> <type>File</type>
...@@ -37,6 +37,6 @@ ...@@ -37,6 +37,6 @@
</chain> </chain>
<chain> <chain>
<type>Text</type> <type>Text</type>
<workflow>document_validation_workflow, document_publication_workflow, ooo_interaction_workflow, dms_file_interaction_workflow, local_permission_interaction_workflow, edit_workflow</workflow> <workflow>document_validation_workflow, document_publication_workflow, ooo_interaction_workflow, dms_file_interaction_workflow, external_processing_workflow, local_permission_interaction_workflow, edit_workflow</workflow>
</chain> </chain>
</workflow_chain> </workflow_chain>
\ No newline at end of file
...@@ -68,73 +68,88 @@ ...@@ -68,73 +68,88 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># XXX-JPS \n <value> <string>"""\n
# This code is horrible: bad spacing, all lines glued together, short unexplicit variable names\n This script receives a request from advanced search form and \n
# Please reformat and rewrite with readable variables and understandable comments\n puts together a search string in a search syntax, depending on\n
# Use standard python spacing, put some space between lines if meaningful,\n parameters received. It is the reverse of parseSearchString external\n
# Add a description. Do not forget to translate messages. This is a multilingual\n method.\n
# system after all.\n
"""\n """\n
XXX-JPS - Put description here\n \n
"""\n req = context.REQUEST\n
req=context.REQUEST\n \n
# with any of\n # words to search in \'any of the words\' form - left intact\n
st=req.get(\'SearchableText\',\'\')\n search_string = req.get(\'SearchableText_any\',\'\')\n
context.log(st)\n \n
# exact phrase\n # exact phrase to search for - double-quoted\n
s_phrase=req.get(\'SearchableText_phrase\',\'\')\n search_phrase = req.get(\'SearchableText_phrase\',\'\')\n
if s_phrase!="":\n if search_phrase != "":\n
st+=\' "\'+s_phrase+\'"\'\n search_string += \' "\' + search_phrase + \'"\'\n
# with all words\n \n
s_all=req.get(\'SearchableText_all\',\'\')\n # search "with all of the words" - each word prefixed by "+"\n
if s_all!="":\n search_all = req.get(\'SearchableText_all\',\'\')\n
st+=\' \'+\' \'.join(\'+\'+w for w in s_all.split(\' \'))\n if search_all != "":\n
# without words\n search_string += \' \' + \' \'.join(\'+\' + word for word in search_all.split(\' \'))\n
s_without=req.get(\'SearchableText_without\',\'\')\n \n
if s_without!="":\n # search without these words - every word prefixed by "-"\n
st+=\' \'+\' \'.join(\'-\'+w for w in s_without.split(\' \'))\n search_without = req.get(\'SearchableText_without\',\'\')\n
# by creation date\n if search_without!="":\n
daterange=req.get(\'created_within\',\'\')\n search_string += \' \' + \' \'.join(\'-\' + word for word in search_without.split(\' \'))\n
\n
# search limited to a certain date range - add "created:xxx"\n
daterange = req.get(\'created_within\',\'\')\n
if daterange!=\'\':\n if daterange!=\'\':\n
st+=\' created:\'+daterange\n search_string += \' created:\' + daterange\n
# portal type\n \n
doctype=req.get(\'search_portal_type\')\n # only given portal_types - add "type:Type" or type:(Type1,Type2...)\n
context.log(doctype)\n portal_type_list = req.get(\'search_portal_type\')\n
if doctype==\'all\':doctype=None\n if portal_type_list == \'all\':\n
if isinstance(doctype,str):\n portal_type_list=None\n
doctype=[doctype]\n if isinstance(portal_type_list,str):\n
if doctype:\n portal_type_list=[portal_type_list]\n
if len(doctype)==1:\n if portal_type_list:\n
st+=\' type:"%s"\' % doctype[0]\n if len(portal_type_list)==1:\n
search_string += \' type:"%s"\' % portal_type_list[0]\n
else:\n else:\n
st+=\' type:(%s)\' % \',\'.join(doctype)\n search_string += \' type:(%s)\' % \',\'.join(portal_type_list)\n
ref=req.get(\'reference\')\n \n
if ref:st+=\' reference:%s\' % ref\n # search by reference\n
ver=req.get(\'version\')\n ref = req.get(\'reference\')\n
if ver:st+=\' version:%s\' % ver\n if ref:\n
search_string += \' reference:%s\' % ref\n
\n
# search by version\n
ver = req.get(\'version\')\n
if ver:\n
search_string += \' version:%s\' % ver\n
\n
# search by language\n
lng=req.get(\'language\')\n lng=req.get(\'language\')\n
if lng and lng!=\'0\':\n if lng and lng != \'0\':\n
st+=\' language:%s\' % lng\n search_string += \' language:%s\' % lng\n
\n
# category search\n # category search\n
for c in (\'group\',\'function\',\'site\'): # XXX-JPS What is this hardcoded stuff ?\n for category in context.Document_getBaseCategoryList():\n
cval=req.get(\'search_\'+c)\n category_value = req.get(\'search_\' + category)\n
if cval:\n if category_value:\n
st+=\' %s:%s\' % (c,cval)\n search_string += \' %s:%s\' % (category, category_value)\n
\n
#only my docs\n #only my docs\n
mine=req.get(\'mine\')\n mine = req.get(\'mine\')\n
if mine:\n if mine:\n
st+=\' mine:yes\'\n search_string += \' mine:yes\'\n
\n
# only newest versions\n # only newest versions\n
newest=req.get(\'newest\')\n newest = req.get(\'newest\')\n
if newest:\n if newest:\n
st+=\' newest:yes\'\n search_string += \' newest:yes\'\n
\n
# search mode\n # search mode\n
sm=req.get(\'search_mode\')\n search_mode = req.get(\'search_mode\')\n
smmap={\'in_boolean_mode\':\'boolean\',\'with_query_expansion\':\'expanded\'}\n search_mode_map={\'in_boolean_mode\':\'boolean\',\'with_query_expansion\':\'expanded\'}\n
if sm and smmap.has_key(sm):\n if search_mode and search_mode_map.has_key(search_mode):\n
st+=\' mode:%s\' % smmap[sm]\n search_string += \' mode:%s\' % search_mode_map[search_mode]\n
context.log(st)\n \n
return st\n return search_string\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -188,12 +203,12 @@ return st\n ...@@ -188,12 +203,12 @@ return st\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>req</string> <string>req</string>
<string>st</string> <string>search_string</string>
<string>s_phrase</string> <string>search_phrase</string>
<string>s_all</string> <string>search_all</string>
<string>s_without</string> <string>search_without</string>
<string>daterange</string> <string>daterange</string>
<string>doctype</string> <string>portal_type_list</string>
<string>None</string> <string>None</string>
<string>isinstance</string> <string>isinstance</string>
<string>str</string> <string>str</string>
...@@ -203,12 +218,12 @@ return st\n ...@@ -203,12 +218,12 @@ return st\n
<string>ver</string> <string>ver</string>
<string>lng</string> <string>lng</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>c</string> <string>category</string>
<string>cval</string> <string>category_value</string>
<string>mine</string> <string>mine</string>
<string>newest</string> <string>newest</string>
<string>sm</string> <string>search_mode</string>
<string>smmap</string> <string>search_mode_map</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -70,112 +70,116 @@ ...@@ -70,112 +70,116 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
# XXX-JPS reformat code as explained in Base_assembleSearchString\n
"""\n """\n
XXX-JPS Please put description here\n The main search script. Receives one big string - a SearchableText, in\n
the search syntax, parses the string using external method parseSearchString,\n
then does the following:\n
- processes arguments for searching by any category (this requires SQLCatalog patch)\n
- selects search mode\n
- adds creation and modification date clauses\n
- searches\n
- if requested, filters result so that only the user\'s docs are returned\n
- if requested, filters result to return only the newest versions\n
\n
TODO: use catalog to get only the user\'s docs - this implementation is slow.\n
"""\n """\n
\n
# if no args we return empty list\n # if no args we return empty list\n
# we use only SearchableText - all params are passed through this\n # we use only SearchableText - all params are passed through this\n
\n \n
sstr=context.REQUEST.get(\'SearchableText\')\n # SearchableText can be supplied in request or stored in selection\n
sstr = context.REQUEST.get(\'SearchableText\')\n
if not sstr:\n if not sstr:\n
sstr=kw.get(\'SearchableText\')\n sstr = kw.get(\'SearchableText\')\n
if not sstr:return []\n if not sstr: return []\n
context.log(sstr)\n
\n \n
args=context.parseSearchString(sstr)\n args = context.parseSearchString(sstr)\n
\n \n
# if no portal type specified, take all\n # if no portal type specified, take all\n
if not args.has_key(\'portal_type\') or args[\'portal_type\']==():\n if not args.has_key(\'portal_type\') or args[\'portal_type\'] == ():\n
args[\'portal_type\']=context.Base_getSearchableTypeList()\n args[\'portal_type\'] = context.Base_getSearchableTypeList()\n
\n \n
# process searching by category\n # process searching by category\n
cats=[]\n cats = []\n
bases=context.portal_categories.getBaseCategoryList()\n bases = context.portal_categories.getBaseCategoryList()\n
for k,v in args.items():\n for k,v in args.items():\n
if k in bases:\n if k in bases:\n
cats.append(\'/\'.join((k,v)))\n cats.append(\'/\'.join((k, v)))\n
if cats!=[]:\n if cats != []:\n
args[\'category\']=cats\n args[\'category\'] = cats\n
\n \n
# expand simplified notation of search mode\n # expand simplified notation of search mode\n
mode=args.get(\'mode\')\n mode = args.get(\'mode\')\n
modemap={\'natural\':0,\'boolean\':\'in_boolean_mode\',\'expanded\':\'with_query_expansion\'}\n modemap = {\'natural\':0, \'boolean\':\'in_boolean_mode\', \'expanded\':\'with_query_expansion\'}\n
if mode and modemap.has_key(mode):\n if mode and modemap.has_key(mode):\n
args[\'search_mode\']=modemap[mode]\n args[\'search_mode\'] = modemap[mode]\n
\n
# user wants only his documents - we try to use Creator from compatibility table\n
if args.get(\'mine\'): \n
context.log(\'mine\')\n
from AccessControl import getSecurityManager\n
sm=getSecurityManager()\n
u=sm.getUser()\n
args[\'Creator\']=str(u)\n
\n \n
kw.update(args)\n kw.update(args)\n
\n \n
# a hack because SQLCatalog wants table.key now \n # a hack because SQLCatalog wants table.key now \n
# dunno if it is a bug or a feature\n # dunno if it is a bug or a feature\n
if kw.has_key(\'SearchableText\'):\n if kw.has_key(\'SearchableText\'):\n
kw[\'full_text.SearchableText\']=kw[\'SearchableText\']\n kw[\'full_text.SearchableText\'] = kw[\'SearchableText\']\n
kw.pop(\'SearchableText\')\n kw.pop(\'SearchableText\')\n
\n \n
cf=kw.get(\'creation_from\')\n cf = kw.get(\'creation_from\')\n
ct=kw.get(\'creation_to\')\n ct = kw.get(\'creation_to\')\n
mf=kw.get(\'modification_from\')\n mf = kw.get(\'modification_from\')\n
mt=kw.get(\'modification_to\')\n mt = kw.get(\'modification_to\')\n
\n \n
wheres=[]\n wheres = []\n
if cf:\n if cf:\n
wheres.append(\'creation_date>"\'+cf.strftime(\'%Y-%m-%d\')+\'"\')\n wheres.append(\'creation_date>"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if ct:\n if ct:\n
wheres.append(\'creation_date<"\'+cf.strftime(\'%Y-%m-%d\')+\'"\')\n wheres.append(\'creation_date<"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if mf:\n if mf:\n
wheres.append(\'modification_date>"\'+cf.strftime(\'%Y-%m-%d\')+\'"\')\n wheres.append(\'modification_date>"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if mt:\n if mt:\n
wheres.append(\'modification_date<"\'+cf.strftime(\'%Y-%m-%d\')+\'"\')\n wheres.append(\'modification_date<"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if wheres!=[]:\n if wheres != []:\n
kw[\'where_expression\']=\' AND \'.join(wheres)\n kw[\'where_expression\'] = \' AND \'.join(wheres)\n
\n \n
# now we search\n # now we search\n
# any language?\n # any language?\n
if kw.get(\'language\')==\'0\':kw.pop(\'language\')\n if kw.get(\'language\') == \'0\': kw.pop(\'language\')\n
context.log(\'SEARCH:\',args)\n context.log(\'SEARCH:\',args)\n
res=context.portal_catalog(**kw)\n res = context.portal_catalog(**kw)\n
\n \n
# user wants only his documents\n # user wants only his documents\n
#if args.get(\'mine\'): \n if args.get(\'mine\'): \n
# context.log(\'mine\')\n context.log(\'mine\')\n
# from AccessControl import getSecurityManager\n from AccessControl import getSecurityManager\n
# sm=getSecurityManager()\n sm = getSecurityManager()\n
# u=sm.getUser()\n u = sm.getUser()\n
# # now we need to filter by owner\n # now we need to filter by owner\n
# # some day we will do it in catalog\n # some day we will do it in catalog\n
# res=[r for r in res if u.allowed(r.getObject(),(\'Owner\',))]\n res = [r for r in res if u.allowed(r.getObject(), (\'Owner\',))]\n
\n \n
#...and now we check for only the newest versions\n #...and now we check for only the newest versions\n
# but we need to preserve order\n # but we need to preserve order\n
if args.get(\'newest\'):\n if args.get(\'newest\'):\n
context.log(\'newest\')\n context.log(\'newest\')\n
idx={} # for recording what we have where and in which version\n idx = {} # for keeping the last version of every reference\n
newest=[]\n # this way we do reduce the number of docs very fast (without calling catalog)\n
counter=0\n newest = [] # for keeping order as it was\n
counter = 0\n
for r in res:\n for r in res:\n
ref=r.getReference()\n ref = r.getReference()\n
try:\n try:\n
ver=int(r.getVersion())\n ver = int(r.getVersion())\n
except ValueError:\n except ValueError:\n
continue\n continue\n
if idx.has_key(ref):\n if idx.has_key(ref):\n
if idx[ref][0]>=ver:\n if idx[ref][0] >= ver:\n
continue\n continue\n
else:\n else:\n
del newest[idx[ref][1]]\n del newest[idx[ref][1]]\n
counter-=1\n counter -= 1\n
newest.append(r)\n newest.append(r)\n
idx[ref]=(ver,counter)\n idx[ref] = (ver, counter)\n
counter+=1\n counter += 1\n
res=newest\n # now that we have only one per reference, we can play with languages and revisions\n
res = [doc.getLatestVersionValue() for doc in newest]\n
\n \n
\n \n
return res\n return res\n
...@@ -243,11 +247,6 @@ return res\n ...@@ -243,11 +247,6 @@ return res\n
<string>v</string> <string>v</string>
<string>mode</string> <string>mode</string>
<string>modemap</string> <string>modemap</string>
<string>AccessControl</string>
<string>getSecurityManager</string>
<string>sm</string>
<string>u</string>
<string>str</string>
<string>cf</string> <string>cf</string>
<string>ct</string> <string>ct</string>
<string>mf</string> <string>mf</string>
...@@ -255,14 +254,21 @@ return res\n ...@@ -255,14 +254,21 @@ return res\n
<string>wheres</string> <string>wheres</string>
<string>_apply_</string> <string>_apply_</string>
<string>res</string> <string>res</string>
<string>AccessControl</string>
<string>getSecurityManager</string>
<string>sm</string>
<string>u</string>
<string>append</string>
<string>$append0</string>
<string>r</string>
<string>idx</string> <string>idx</string>
<string>newest</string> <string>newest</string>
<string>counter</string> <string>counter</string>
<string>r</string>
<string>ref</string> <string>ref</string>
<string>int</string> <string>int</string>
<string>ver</string> <string>ver</string>
<string>ValueError</string> <string>ValueError</string>
<string>doc</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -279,7 +285,7 @@ return res\n ...@@ -279,7 +285,7 @@ return res\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_getAdvancedSearchResultList</string> </value> <value> <string>Base_getAdvancedSearchResultList</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -68,22 +68,30 @@ ...@@ -68,22 +68,30 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># XXX-JPS reformat code as explained in Base_assembleSearchString\n <value> <string>"""\n
"""\n
we search for docs that reference us in any way (reference only or more specific)\n we search for docs that reference us in any way (reference only or more specific)\n
by making a union of a number of searches\n
we can return raw set, the class will get objects and make the records unique\n we can return raw set, the class will get objects and make the records unique\n
if you want only the most recent versions, filter the result and apply DMS_findDocument\n and make sure we get latest/most relevant version\n
should be reimplemented in SQL some sunny day.\n
"""\n """\n
ss=[]\n \n
if context.getReference() is None: return []\n ss = []\n
\n
if context.getReference() is None: \n
return []\n
\n
ss.append(context.getReference())\n ss.append(context.getReference())\n
\n
if context.getLanguage() is not None:\n if context.getLanguage() is not None:\n
ss.append(context.getReference()+\'-\'+context.getLanguage())\n ss.append(context.getReference() + \'-\' + context.getLanguage())\n
if context.getVersion() is not None:\n if context.getVersion() is not None:\n
ss.append(context.getReference()+\'-\'+context.getLanguage()+\'-\'+context.getVersion())\n ss.append(context.getReference() + \'-\' + context.getLanguage() + \'-\' + context.getVersion())\n
\n
lst=[]\n lst=[]\n
for t in ss:\n for t in ss:\n
lst+=context.portal_catalog(SearchableText=\'%\'+t+\'%\')\n lst += context.portal_catalog(SearchableText=\'%\' + t + \'%\')\n
\n
return lst\n return lst\n
</string> </value> </string> </value>
</item> </item>
...@@ -158,7 +166,7 @@ return lst\n ...@@ -158,7 +166,7 @@ return lst\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_findWikiPredecessorList</string> </value> <value> <string>Base_getImplicitPredecessorValueList</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -68,19 +68,45 @@ ...@@ -68,19 +68,45 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>ob=state_change.object\n <value> <string encoding="cdata"><![CDATA[
kw=ob.REQUEST\n
f=kw.get(\'my_file\',None)\n """\n
ob.log(script.getId(),ob.getRelativeUrl())\n Called by document.getImplicitSuccessorValueList\n
Gets a list of dicts containing reference and/or version and/or language\n
and maybe some more things.\n
Returns a list of objects.\n
\n \n
if f is not None and f:\n dummy simple implementation - if no version, then return the newest in the chosen language\n
# if file uploaded, then:\n or in any language if not specified\n
fname=f.filename\n """\n
ob.setPropertyListFromFilename(fname)\n \n
ob.setSourceReference(fname)\n def findDocByReferenceDict(ref_dict):\n
if not ob.getTitle():\n reference=ref_dict.get(\'reference\')\n
ob.setTitle(fname)\n if reference is None:\n
</string> </value> return\n
# assuming we want only the highest version:\n
searchargs = dict(reference=reference, portal_type=context.getPortalDocumentTypeList(), sort_on=\'version\', sort_order=\'descending\')\n
language = ref_dict.get(\'language\')\n
if language is not None:\n
searchargs[\'language\'] = language\n
version = ref_dict.get(\'version\')\n
if version is not None:\n
searchargs[\'version\']=version\n
res = list(context.portal_catalog(**searchargs))\n
if len(res)>0:\n
return res[0]\n
\n
res = []\n
\n
for ref_dict in reference_list:\n
ob = findDocByReferenceDict(ref_dict)\n
if ob is not None:\n
res.append(ob)\n
\n
return res\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -96,7 +122,7 @@ if f is not None and f:\n ...@@ -96,7 +122,7 @@ if f is not None and f:\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>state_change</string> </value> <value> <string>reference_list</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -122,14 +148,14 @@ if f is not None and f:\n ...@@ -122,14 +148,14 @@ if f is not None and f:\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>reference_list</string>
<string>_getattr_</string> <string>findDocByReferenceDict</string>
<string>res</string>
<string>_getiter_</string>
<string>ref_dict</string>
<string>ob</string> <string>ob</string>
<string>kw</string>
<string>None</string> <string>None</string>
<string>f</string> <string>_getattr_</string>
<string>script</string>
<string>fname</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -146,7 +172,7 @@ if f is not None and f:\n ...@@ -146,7 +172,7 @@ if f is not None and f:\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SetReferenceFromFilename</string> </value> <value> <string>Base_getImplicitSuccessorValueList</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -72,10 +72,12 @@ ...@@ -72,10 +72,12 @@
get related object title in a security-aware way (without throwing exception\n get related object title in a security-aware way (without throwing exception\n
if I don\'t have permissions to access the object)\n if I don\'t have permissions to access the object)\n
"""\n """\n
# XXX-JPS reformat code as explained in Base_assembleSearchString\n \n
cat_value=context.getProperty(category) # XXX-JPS please rename cat_value - this is a path - value is normally used to name objects (ex. getResourceValue). Also, category parameter is strange. This is a base category afterall. Name it base_category\n base_category = context.getProperty(category)\n
if cat_value is None:return \'\'\n if base_category is None:\n
ob=context.restrictedTraverse(cat_value,None)\n return \'\'\n
\n
ob = context.restrictedTraverse(base_category, None)\n
return ob is not None and ob.getTitle() or \'\'\n return ob is not None and ob.getTitle() or \'\'\n
# XXX-JPS What would be the problem in using getMyCategoryTitle() ?\n # XXX-JPS What would be the problem in using getMyCategoryTitle() ?\n
</string> </value> </string> </value>
...@@ -129,7 +131,7 @@ return ob is not None and ob.getTitle() or \'\'\n ...@@ -129,7 +131,7 @@ return ob is not None and ob.getTitle() or \'\'\n
<string>category</string> <string>category</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>cat_value</string> <string>base_category</string>
<string>None</string> <string>None</string>
<string>ob</string> <string>ob</string>
</tuple> </tuple>
......
...@@ -72,11 +72,11 @@ ...@@ -72,11 +72,11 @@
get related object title list in a security-aware way (without throwing exception\n get related object title list in a security-aware way (without throwing exception\n
if I don\'t have permissions to access the object)\n if I don\'t have permissions to access the object)\n
"""\n """\n
# XXX-JPS reformat code as explained in Base_assembleSearchString\n
ob_list=context.Base_getRelatedObjectValueList(category) # XXX-JPS This is a base category afterall. Name it base_category\n
title_list=[o.getTitle() for o in ob_list]\n
\n \n
return filter(lambda t:t!=\'\',title_list)\n ob_list = context.Base_getRelatedObjectValueList(category)\n
title_list = [o.getTitle() for o in ob_list]\n
\n
return filter(lambda t:t!=\'\', title_list)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -99,7 +99,7 @@ return filter(lambda t:t!=\'\',title_list)\n ...@@ -99,7 +99,7 @@ return filter(lambda t:t!=\'\',title_list)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>category</string> </value> <value> <string>base_category</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -125,9 +125,10 @@ return filter(lambda t:t!=\'\',title_list)\n ...@@ -125,9 +125,10 @@ return filter(lambda t:t!=\'\',title_list)\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>category</string> <string>base_category</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>category</string>
<string>ob_list</string> <string>ob_list</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
......
...@@ -72,18 +72,17 @@ ...@@ -72,18 +72,17 @@
get related object value list in a security-aware way (without throwing exception\n get related object value list in a security-aware way (without throwing exception\n
if I don\'t have permissions to access the object)\n if I don\'t have permissions to access the object)\n
"""\n """\n
# XXX-JPS reformat code as explained in Base_assembleSearchString\n
# New names: object_list, category_list, base_category\n
cat_value_list=context.getPropertyList(category)\n
if cat_value_list is None:return []\n
\n \n
def getValueIfAvailable(cat_value):\n category_list = context.getPropertyList(base_category)\n
ob=context.restrictedTraverse(cat_value,None)\n if category_list is None:\n
return []\n
\n
def getValueIfAvailable(category):\n
ob = context.restrictedTraverse(category, None)\n
return ob \n return ob \n
\n \n
ob_list=[getValueIfAvailable(c) for c in cat_value_list]\n ob_list = [getValueIfAvailable(category) for category in category_list]\n
return ob_list\n return [o for o in object_list if o is not None]\n
return [o for o in ob_list if o is not None]\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -106,7 +105,7 @@ return [o for o in ob_list if o is not None]\n ...@@ -106,7 +105,7 @@ return [o for o in ob_list if o is not None]\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>category</string> </value> <value> <string>base_category</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -132,17 +131,18 @@ return [o for o in ob_list if o is not None]\n ...@@ -132,17 +131,18 @@ return [o for o in ob_list if o is not None]\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>category</string> <string>base_category</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>cat_value_list</string> <string>category_list</string>
<string>None</string> <string>None</string>
<string>getValueIfAvailable</string> <string>getValueIfAvailable</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>c</string> <string>category</string>
<string>ob_list</string> <string>ob_list</string>
<string>object_list</string>
<string>o</string> <string>o</string>
</tuple> </tuple>
</value> </value>
......
...@@ -68,11 +68,11 @@ ...@@ -68,11 +68,11 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>req=context.REQUEST\n <value> <string>req = context.REQUEST\n
sstr=context.Base_assembleSearchString()\n sstr = context.Base_assembleSearchString()\n
context.log(sstr)\n context.log(sstr)\n
req.set(\'SearchableText\',sstr)\n req.set(\'SearchableText\', sstr)\n
return context.Base_advancedSearchResults()\n return context.Base_viewAdvancedSearchResultList()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -70,25 +70,37 @@ ...@@ -70,25 +70,37 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
# XXX-JPS reformat code as explained in Base_assembleSearchString\n
"""\n """\n
XXX-JPS put descrition here\n This is used in listbox with search results - shows parts of the searchable text\n
of a document which contain searched words, highlighting the words.\n
Calls external method cutFound to get appropriately sliced result.\n
"""\n """\n
tags=(\'<div style="font-weight:bold;display:inline;">\',\'</div>\')\n \n
trail=5\n # tags to surround words which were searched for\n
maxlines=5\n tags = (\'<div style="font-weight:bold;display:inline;">\', \'</div>\')\n
txt=brain.getObject().SearchableText()\n \n
st=selection.params.get(\'SearchableText\')\n # how many words to include before and after the highlighted word\n
if st is None:\n trail = 5\n
# we should return something\n \n
return txt[min(len(txt)-300,200):500] # a somewhat arbitrary choice to trim searchable attrs\n # maximum lines to show\n
args=context.parseSearchString(st)\n maxlines = 5\n
sw=args.get(\'SearchableText\')\n \n
if sw is None or sw==\'\':\n txt = brain.getObject().SearchableText()\n
# we should return something\n search_string = selection.params.get(\'SearchableText\')\n
return txt[min(len(txt)-300,200):500] # a somewhat arbitrary choice to trim searchable attrs\n if search_string is None:\n
res=context.cutFound(context,txt,sw,tags,trail,maxlines)\n # if the searched text is empty (e.g. because the listbox uses its own method)\n
return \' \'.join(map(str,res))\n # we return something\n
return txt[min(len(txt) - 300, 200) : 500] # a somewhat arbitrary choice to trim searchable attrs\n
\n
search_argument_list = context.parseSearchString(search_string)\n
search_words = search_argument_list.get(\'SearchableText\')\n
if search_words is None or search_words == \'\':\n
# if the searched text is empty (e.g. because we used only parameters without pure searchable text)\n
# we return something\n
return txt[min(len(txt) - 300, 200) : 500] # a somewhat arbitrary choice to trim searchable attrs\n
\n
res = context.cutFound(context, txt, search_words, tags, trail, maxlines)\n
return \' \'.join(map(str, res))\n
]]></string> </value> ]]></string> </value>
...@@ -140,14 +152,14 @@ return \' \'.join(map(str,res))\n ...@@ -140,14 +152,14 @@ return \' \'.join(map(str,res))\n
<string>maxlines</string> <string>maxlines</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>txt</string> <string>txt</string>
<string>st</string> <string>search_string</string>
<string>None</string> <string>None</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>min</string> <string>min</string>
<string>len</string> <string>len</string>
<string>context</string> <string>context</string>
<string>args</string> <string>search_argument_list</string>
<string>sw</string> <string>search_words</string>
<string>res</string> <string>res</string>
<string>map</string> <string>map</string>
<string>str</string> <string>str</string>
......
...@@ -68,8 +68,12 @@ ...@@ -68,8 +68,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>#XXX-JPS What is the use of this script ?\n <value> <string>"""\n
return context.getWikiSuccessorValueList()\n This is proxy to portal_catalog, with the sole purpose\n
of performing calls when proxy roles are needed\n
"""\n
\n
return context.portal_catalog(*a, **kw)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -86,7 +90,19 @@ return context.getWikiSuccessorValueList()\n ...@@ -86,7 +90,19 @@ return context.getWikiSuccessorValueList()\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>*a,**kw</string> </value> <value> <string>*a, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Auditor</string>
<string>Reviewer</string>
</tuple>
</value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -114,6 +130,7 @@ return context.getWikiSuccessorValueList()\n ...@@ -114,6 +130,7 @@ return context.getWikiSuccessorValueList()\n
<tuple> <tuple>
<string>a</string> <string>a</string>
<string>kw</string> <string>kw</string>
<string>_apply_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
</tuple> </tuple>
...@@ -132,7 +149,7 @@ return context.getWikiSuccessorValueList()\n ...@@ -132,7 +149,7 @@ return context.getWikiSuccessorValueList()\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_listWikiSuccessor</string> </value> <value> <string>Base_unrestrictedSearchResults</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -94,12 +94,13 @@ ...@@ -94,12 +94,13 @@
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>SearchableText</string> <string>SearchableText_any</string>
<string>SearchableText_all</string>
<string>SearchableText_phrase</string>
<string>SearchableText_without</string>
<string>my_search_portal_type</string> <string>my_search_portal_type</string>
<string>creation_from</string> <string>creation_from</string>
<string>creation_to</string> <string>creation_to</string>
<string>publication_from</string>
<string>publication_to</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -113,6 +114,7 @@ ...@@ -113,6 +114,7 @@
<string>mine</string> <string>mine</string>
<string>newest</string> <string>newest</string>
<string>search_mode</string> <string>search_mode</string>
<string>my_created_within</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>SearchableText</string> </value> <value> <string>SearchableText_any</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -575,7 +575,7 @@ ...@@ -575,7 +575,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>method_name</string> </key> <key> <string>method_name</string> </key>
<value> <string>DMS_getAdvancedSearchResults</string> </value> <value> <string>Base_getAdvancedSearchResultList</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -4,24 +4,14 @@ ...@@ -4,24 +4,14 @@
<pickle> <pickle>
<tuple> <tuple>
<tuple> <tuple>
<string>Products.PythonScripts.PythonScript</string> <string>Products.ERP5Form.Form</string>
<string>PythonScript</string> <string>ERP5Form</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item> <item>
<key> <string>__ac_local_roles__</string> </key> <key> <string>__ac_local_roles__</string> </key>
<value> <value>
...@@ -41,24 +31,7 @@ ...@@ -41,24 +31,7 @@
<item> <item>
<key> <string>_asgns</string> </key> <key> <string>_asgns</string> </key>
<value> <value>
<dictionary> <dictionary/>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -67,87 +40,112 @@ ...@@ -67,87 +40,112 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_objects</string> </key>
<value> <string># XXX-JPS reformat code as explained in Base_assembleSearchString\n
"""\n
XXX-JPS Description here please\n
"""\n
# XXX-JPS This looks like API level.\n
# A good API for the conversion process with a documentation on OOoDocument class\n
# would help a lot to make things clearer and better designed.\n
\n
# implementation layer - operations to be perfomed after converting data to ODF\n
return\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <value>
<none/> <tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>_filepath</string> </key> <key> <string>_owner</string> </key>
<value> <value>
<none/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>_owner</string> </key> <key> <string>action</string> </key>
<value> <value> <string>Base_edit</string> </value>
<none/> </item>
</value> <item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>enctype</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<tuple/> <list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>func_code</string> </key> <key> <string>groups</string> </key>
<value> <value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>bottom</string> </key>
<value> <int>0</int> </value> <value>
<list>
<string>listbox</string>
</list>
</value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>center</string> </key>
<value> <value>
<tuple/> <list/>
</value> </value>
</item> </item>
</dictionary> <item>
</state> <key> <string>left</string> </key>
</object> <value>
<list>
<string>my_title</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>right</string> </key>
<value> <value>
<none/> <list>
<string>my_reference</string>
</list>
</value>
</item>
</dictionary>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>OOoDocument_postConversion</string> </value> <value> <string>Base_viewLocalPermissionList</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>method</string> </key>
<value> <value> <string>POST</string> </value>
<tuple/> </item>
</value> <item>
<key> <string>name</string> </key>
<value> <string>Base_viewLocalPermission</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Local Permissions</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -68,15 +68,25 @@ ...@@ -68,15 +68,25 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># customizeable function for incrementing version number\n <value> <string>typetoext = {\n
# it depends on a chosen version number format\n \'Text\':(\'doc\', \'sxw\', \'odt\', \'txt\', \'rtf\'),\n
# default is %03d\n \'Spreadsheet\':(\'xls\', \'sxc\', \'ods\'),\n
# version can be argument or from context\n \'Presentation\':(\'ppt\', \'odp\'),\n
# TODO: version number format in preferences (?)\n \'Drawing\':(\'odg\',),\n
# use same pattern for correcting version numbers entered in other ways (Constraint?)\n \'Image\':(\'jpg\', \'jpeg\', \'gif\', \'bmp\', \'png\'),\n
\'PDF\':(\'pdf\',),\n
}\n
\n \n
ver=ver or context.getVersion()\n multitypes = {\n
return \'%03d\' % (int(ver)+1)\n # \'Text\':(\'Text\', \'Memo\')\n
}\n
context.log(ext)\n
\n
for ptype, ext_list in typetoext.items():\n
if ext in ext_list:\n
return multitypes.get(ptype, (ptype,))\n
\n
return ()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -93,7 +103,7 @@ return \'%03d\' % (int(ver)+1)\n ...@@ -93,7 +103,7 @@ return \'%03d\' % (int(ver)+1)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>ver=None</string> </value> <value> <string>ext</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -119,10 +129,14 @@ return \'%03d\' % (int(ver)+1)\n ...@@ -119,10 +129,14 @@ return \'%03d\' % (int(ver)+1)\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>ver</string> <string>ext</string>
<string>typetoext</string>
<string>multitypes</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>int</string> <string>_getiter_</string>
<string>ptype</string>
<string>ext_list</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -134,14 +148,12 @@ return \'%03d\' % (int(ver)+1)\n ...@@ -134,14 +148,12 @@ return \'%03d\' % (int(ver)+1)\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_incrementVersion</string> </value> <value> <string>ContributionTool_getCandidateTypeListByExtension</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -68,10 +68,19 @@ ...@@ -68,10 +68,19 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># implementation specific layer\n <value> <string>"""\n
# map document type id to portal type\n Called by portal_contributions.getPropertyDictFromFilename\n
# in stock dms not used\n \n
return\n Receives file name and a dict of properties found in file name by\n
using regular expression defined in preferences.\n
\n
If necessary can do additional things (like mapping\n
portal type id to portal type name).\n
\n
Type-based.\n
"""\n
\n
return property_dict\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -94,7 +103,7 @@ return\n ...@@ -94,7 +103,7 @@ return\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>doctype_id</string> </value> <value> <string>file_name, property_dict</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -114,13 +123,14 @@ return\n ...@@ -114,13 +123,14 @@ return\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>2</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>doctype_id</string> <string>file_name</string>
<string>property_dict</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -137,7 +147,7 @@ return\n ...@@ -137,7 +147,7 @@ return\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_idToType</string> </value> <value> <string>ContributionTool_getPropertyDictFromFileName</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -68,50 +68,42 @@ ...@@ -68,50 +68,42 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># XXX-JPS reformat code as explained in Base_assembleSearchString\n <value> <string>"""\n
# I wonder how this relates to the ingestion machinary and to\n Processes request of ContributionTool_viewContributeFileDialog\n
# is this the same as Document_ingestFile ?\n does what is necessary and calls portal_contributions.newContent\n
redirects to what is returned\n
"""\n """\n
XXX-JPS Description here please\n
"""\n
# determine content type if not given\n
# first try from content\n
context.log(fname,doctype)\n
if doctype is None or doctype==\'\':\n
props=context.Document_getPropertyListFromContent(context,data,None)\n
doctype=props.get(\'doctype\')\n
# then from filename\n
if doctype is None or doctype==\'\':\n
props=context.Document_getPropertiesFromFilename(context,fname)\n
context.log(props)\n
doctype_id=props.get(\'doctype_id\')\n
if doctype_id is not None:\n
doctype=context.Document_idToType(doctype_id)\n
context.log(doctype)\n
if doctype is None or doctype==\'\':\n
doctype=context.content_type_registry.findTypeName(fname,None,None)\n
context.log(fname,doctype)\n
if doctype is None or doctype==\'\':\n
raise Exception("content type for file %s not registered" % fname)\n
\n \n
# create content\n from Products.Formulator.Errors import FormValidationError\n
# find appropriate module\n \n
mod=None\n translateString = context.Base_translateString\n
modlist=[m for m in context.getPortalObject().objectIds() if m.endswith(\'_module\')]\n request = context.REQUEST\n
for mod in modlist:\n \n
mod=context.restrictedTraverse(mod,None)\n # a workaround for a strange problem\n
if mod is None:\n # (if this line is not here, ZODB raises an exception when\n
continue\n # committing transaction)\n
if doctype in context.portal_types[mod.getPortalType()].allowed_content_types:\n del(kw[\'field_your_file\'])\n
break\n \n
if mod is None:\n if kw[\'portal_type\'] == \'\':\n
raise Exception(\'could not find module for \'+doctype)\n # we don\'t want to set portal_type to \'\' :)\n
# create and populate object\n del(kw[\'portal_type\'])\n
ob=mod.newContent(portal_type=doctype)\n \n
ob.manage_upload(data)\n doc = context.portal_contributions.newContent(file=file, **kw)\n
ob.Document_setOtherProperties(uname)\n \n
ob.DMS_ingestFile(fname,data)\n context.log(doc.getId(), doc.getRelativeUrl())\n
return ob\n \n
msg = translateString("${portal_type} created successfully.", mapping = {\'portal_type\':doc.getPortalType()})\n
return context.Base_redirect(\'view\', keep_items = {\'portal_status_message\':msg})\n
\n
\n
# we leave this for later, because this way it is easier to debug\n
try:\n
doc = context.portal_contributions.newContent(file=file, **kw)\n
if doc is None:\n
raise ValueError(\'new content could not be generated for unknown reason (check system log)\')\n
except Exception, e:\n
msg = translateString("Sorry, object could not be created. Error returned was: ${exception}.", mapping = {\'exception\':str(e)})\n
return context.Base_redirect(dialog_id, keep_items={\'portal_status_message\':msg})\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -128,7 +120,7 @@ return ob\n ...@@ -128,7 +120,7 @@ return ob\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>fname,data, doctype=None,uname=None</string> </value> <value> <string>dialog_id=None, form_id=None, file=None, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -148,30 +140,32 @@ return ob\n ...@@ -148,30 +140,32 @@ return ob\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>4</int> </value> <value> <int>3</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>fname</string> <string>dialog_id</string>
<string>data</string> <string>form_id</string>
<string>doctype</string> <string>file</string>
<string>uname</string> <string>kw</string>
<string>Products.Formulator.Errors</string>
<string>FormValidationError</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>translateString</string>
<string>request</string>
<string>_write_</string>
<string>_getitem_</string>
<string>_apply_</string>
<string>doc</string>
<string>msg</string>
<string>None</string> <string>None</string>
<string>props</string> <string>ValueError</string>
<string>doctype_id</string>
<string>Exception</string> <string>Exception</string>
<string>mod</string> <string>e</string>
<string>append</string> <string>str</string>
<string>$append0</string>
<string>_getiter_</string>
<string>m</string>
<string>modlist</string>
<string>_getitem_</string>
<string>ob</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -186,12 +180,13 @@ return ob\n ...@@ -186,12 +180,13 @@ return ob\n
<tuple> <tuple>
<none/> <none/>
<none/> <none/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_createObjectFromFile</string> </value> <value> <string>ContributionTool_newContent</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.Form</string>
<string>ERP5Form</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>ContributionTool_newContent</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string>multipart/form-data</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>your_classification</string>
<string>your_portal_type</string>
<string>your_file</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ContributionTool_viewContributeFileDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>ContributionTool_contributeFile</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Contribute file</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>FileField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_file</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>File to upload</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.Form</string>
<string>ERP5Form</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ContributionTool_viewMyContentList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>ContributionTool_viewMyContentList</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -386,6 +386,18 @@ ...@@ -386,6 +386,18 @@
<string>reference</string> <string>reference</string>
<string>Reference</string> <string>Reference</string>
</tuple> </tuple>
<tuple>
<string>version</string>
<string>Version</string>
</tuple>
<tuple>
<string>language</string>
<string>Language</string>
</tuple>
<tuple>
<string>revision</string>
<string>Revision</string>
</tuple>
<tuple> <tuple>
<string>short_title</string> <string>short_title</string>
<string>Short Title</string> <string>Short Title</string>
...@@ -398,10 +410,6 @@ ...@@ -398,10 +410,6 @@
<string>description</string> <string>description</string>
<string>Description</string> <string>Description</string>
</tuple> </tuple>
<tuple>
<string>version</string>
<string>Version</string>
</tuple>
<tuple> <tuple>
<string>int_index</string> <string>int_index</string>
<string>Index</string> <string>Index</string>
......
...@@ -68,19 +68,22 @@ ...@@ -68,19 +68,22 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># XXX-JPS reformat code as explained in Base_assembleSearchString\n <value> <string>"""\n
"""\n Public interface to convert API method - sets additional headers and returns\n
XXX-JPS Description here please\n output (a file in desired format).\n
"""\n """\n
\n \n
# ZMI level interface for getting file converted to a desired format\n request = context.REQUEST\n
type,data=context.getTargetFile(format)\n response = request.RESPONSE\n
request=context.REQUEST\n \n
request.RESPONSE.setHeader(\'Content-type\', type)\n data = context.index_html(request, response, format=format, force=force)\n
context.log(\'format\',format)\n typ = response.headers.get(\'content-type\')\n
filename=\'%s.%s\' % ((filename or context.title_or_id(), format))\n \n
if type==\'application/zip\':\n filename = \'%s.%s\' % ((filename or context.title_or_id(), format))\n
filename+=\'.zip\'\n if typ == \'application/zip\':\n
filename += \'.zip\'\n
\n
\n
request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % filename)\n request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % filename)\n
return data\n return data\n
</string> </value> </string> </value>
...@@ -99,7 +102,7 @@ return data\n ...@@ -99,7 +102,7 @@ return data\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>filename, format</string> </value> <value> <string>filename=None, format=None, force=0</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -119,7 +122,7 @@ return data\n ...@@ -119,7 +122,7 @@ return data\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>2</int> </value> <value> <int>3</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -127,12 +130,13 @@ return data\n ...@@ -127,12 +130,13 @@ return data\n
<tuple> <tuple>
<string>filename</string> <string>filename</string>
<string>format</string> <string>format</string>
<string>force</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>_getiter_</string>
<string>type</string>
<string>data</string>
<string>request</string> <string>request</string>
<string>response</string>
<string>data</string>
<string>typ</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -144,12 +148,16 @@ return data\n ...@@ -144,12 +148,16 @@ return data\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
<none/>
<int>0</int>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>OOoDocument_getTargetFile</string> </value> <value> <string>Document_convert</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
...@@ -70,12 +70,15 @@ ...@@ -70,12 +70,15 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
# XXX-JPS reformat code as explained in Base_assembleSearchString\n htmlrepr = context.getHtmlRepresentation()\n
htmlrepr=context.getHtmlRepresentation()[:2000]\n \n
htmlrepr=\'<div style="background-color:white;color:black;">%s</div>\' % htmlrepr\n # wrap it in a div with white background\n
context.log(context.REQUEST[\'URL\'])\n htmlrepr = \'<div style="background-color:white;color:black;">%s</div>\' % htmlrepr\n
if context.portal_type==\'Spreadsheet\':\n \n
htmlrepr=htmlrepr.replace(\'<A HREF="#table\',\'<A HREF="%s#table\' % context.REQUEST[\'URL\'])\n # fix internal links in spreadsheet\n
if context.portal_type == \'Spreadsheet\':\n
htmlrepr = htmlrepr.replace(\'<A HREF="#table\',\'<A HREF="%s#table\' % context.REQUEST[\'URL\'])\n
\n
return htmlrepr\n return htmlrepr\n
...@@ -121,10 +124,10 @@ return htmlrepr\n ...@@ -121,10 +124,10 @@ return htmlrepr\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>htmlrepr</string> <string>htmlrepr</string>
<string>_getitem_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -69,10 +69,10 @@ ...@@ -69,10 +69,10 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""\n <value> <string>"""\n
XXX-JPS Please add description. If this is a core custmisable script,\n Implementation layer - operations to be perfomed after converting data to text\n
please explain in Document class in Products.ERP5.Document\n by discoverMetadata method or script.\n
"""\n """\n
# overwrite this to add implementation-specific consistency check\n \n
return\n return\n
</string> </value> </string> </value>
</item> </item>
...@@ -137,7 +137,7 @@ return\n ...@@ -137,7 +137,7 @@ return\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Document_additionalConsistencyCheck</string> </value> <value> <string>Document_finishIngestion</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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