Commit 7c47a9be authored by Mayoro Diagne's avatar Mayoro Diagne

2008-09-17: mayoro

- Adding workflow scripts in documentation helper for ODT

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23673 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 00683235
......@@ -153,17 +153,12 @@ for section in section_list:\n
results = context.DocumentationHelper_getDocumentationSectionListParams(class_name,\n
child_uri.uri_list)\n
result+=results[0]\n
class_methods_list+=results[1]\n
property_sheets_list+=results[2]\n
if root_class_name == "ERP5SiteDocumentationHelper":\n
for sub_child_uri in child_uri.getSectionList():\n
class_name = sub_child_uri.getClassName()\n
results=context.DocumentationHelper_getDocumentationSectionListParams(class_name,\n
sub_child_uri.uri_list)\n
result+=results[0]\n
class_methods_list+=results[1]\n
property_sheets_list+=results[2]\n
\n
elif portal_skin == "ODT" and root_class_name == "ERP5SiteDocumentationHelper":\n
for child_uri in uri_object.getSectionList():\n
class_name = child_uri.getClassName()\n
......@@ -182,6 +177,18 @@ for section in section_list:\n
result+=results[0]\n
class_methods_list+=results[1]\n
property_sheets_list+=results[2]\n
if root_class_name == "ERP5SiteDocumentationHelper" and class_name==\'DCWorkflowDocumentationHelper\':\n
for sub_child_uri in child_uri.uri_list:\n
sub_child_object = context.getDocumentationHelper(class_name, sub_child_uri)\n
for section in sub_child_object.getSectionList(): \n
if section.class_name == \'DCWorkflowScriptDocumentationHelper\':\n
class_name = section.class_name\n
results=context.DocumentationHelper_getDocumentationSectionListParams(class_name,\n
section.uri_list, "%s:" % sub_child_object.getId())\n
result+=results[0]\n
class_methods_list+=results[1]\n
property_sheets_list+=results[2]\n
\n
if portal_skin is not None and portal_skin=="ODT":\n
result.append(\n
ReportSection(\n
......@@ -288,6 +295,7 @@ return result\n
<string>sub_child_uri</string>
<string>getattr</string>
<string>child_uri_title</string>
<string>sub_child_object</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
......
......@@ -74,6 +74,10 @@ REQUEST.set(\'is_documentation_report\', True)\n
sub_result = []\n
propertysheet_list = []\n
class_method_list = []\n
if class_name == \'DCWorkflowScriptDocumentationHelper\':\n
level=6\n
else:\n
level=5\n
for uri in uri_list:\n
uri_object = context.getDocumentationHelper(class_name, uri)\n
if class_name in [\'PortalTypeDocumentationHelper\',\'PortalTypeInstanceDocumentationHelper\']:\n
......@@ -85,8 +89,8 @@ for uri in uri_list:\n
sub_result.append(\n
ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
level=5,\n
title=getTitle(uri.split(\'.\')[-1]),\n
level=level,\n
title="%s%s" % (prefix_title, getTitle(uri.split(\'.\')[-1])),\n
form_id=\'\')\n
)\n
sub_result.append(\n
......@@ -100,7 +104,7 @@ for uri in uri_list:\n
sub_result.append(\n
ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
level=4,\n
level=level,\n
method_id=\'getDocumentationHelper\',\n
form_id=\'%s_view\' % class_name,\n
param_list=[class_name,\n
......@@ -124,7 +128,7 @@ return (sub_result,class_method_list,propertysheet_list)\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>class_name=\'\', uri_list=[]</string> </value>
<value> <string>class_name=\'\', uri_list=[], prefix_title=\'\'</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -144,7 +148,7 @@ return (sub_result,class_method_list,propertysheet_list)\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -152,6 +156,7 @@ return (sub_result,class_method_list,propertysheet_list)\n
<tuple>
<string>class_name</string>
<string>uri_list</string>
<string>prefix_title</string>
<string>getTitle</string>
<string>Products.ERP5Form.Report</string>
<string>ReportSection</string>
......@@ -162,6 +167,7 @@ return (sub_result,class_method_list,propertysheet_list)\n
<string>sub_result</string>
<string>propertysheet_list</string>
<string>class_method_list</string>
<string>level</string>
<string>_getiter_</string>
<string>uri</string>
<string>uri_object</string>
......@@ -183,6 +189,7 @@ return (sub_result,class_method_list,propertysheet_list)\n
<tuple>
<string></string>
<list/>
<string></string>
</tuple>
</value>
</item>
......
90
\ No newline at end of file
101
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment