Commit f0b440fe authored by Mayoro Diagne's avatar Mayoro Diagne

2008-09-13: mayoro

- Appendix generation is only for ODT style

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23604 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent af01ab19
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
from Products.ERP5Form.Report import ReportSection\n from Products.ERP5Form.Report import ReportSection\n
REQUEST = context.REQUEST\n REQUEST = context.REQUEST\n
REQUEST.set(\'is_documentation_report\', True)\n REQUEST.set(\'is_documentation_report\', True)\n
portal_skin = REQUEST.get(\'portal_skin\')\n
result = []\n result = []\n
root_class_name = REQUEST.get(\'class_name\')\n root_class_name = REQUEST.get(\'class_name\')\n
class_methods_list = []\n class_methods_list = []\n
...@@ -103,7 +104,6 @@ result.append(\n ...@@ -103,7 +104,6 @@ result.append(\n
documentation_helper.getURI()],\n documentation_helper.getURI()],\n
listbox_display_mode=\'FlatListMode\')\n listbox_display_mode=\'FlatListMode\')\n
)\n )\n
\n
for section in section_list:\n for section in section_list:\n
result.append(\n result.append(\n
ReportSection(\n ReportSection(\n
...@@ -147,7 +147,6 @@ for section in section_list:\n ...@@ -147,7 +147,6 @@ for section in section_list:\n
uri],\n uri],\n
listbox_display_mode=\'FlatListMode\')\n listbox_display_mode=\'FlatListMode\')\n
)\n )\n
portal_skin = REQUEST.get(\'portal_skin\')\n
if portal_skin is None or portal_skin == \'View\':\n if portal_skin is None or portal_skin == \'View\':\n
for child_uri in uri_object.getSectionList():\n for child_uri in uri_object.getSectionList():\n
class_name = child_uri.getClassName()\n class_name = child_uri.getClassName()\n
...@@ -183,40 +182,41 @@ for section in section_list:\n ...@@ -183,40 +182,41 @@ for section in section_list:\n
result+=results[0]\n result+=results[0]\n
class_methods_list+=results[1]\n class_methods_list+=results[1]\n
property_sheets_list+=results[2]\n property_sheets_list+=results[2]\n
result.append(\n if portal_skin is not None and portal_skin=="ODT":\n
ReportSection(\n result.append(\n
level=3,\n ReportSection(\n
title="Appendix",\n level=3,\n
form_id=\'\')\n title="Appendix",\n
)\n form_id=\'\')\n
classmethod = dict().fromkeys([x.split(\'.\')[-1] for x in class_methods_list]).keys()\n )\n
propertysheet = dict().fromkeys([x.split(\'/\')[-1].split(\'.\')[0] for x in property_sheets_list]).keys()\n classmethod = dict().fromkeys([x.split(\'.\')[-1] for x in class_methods_list]).keys()\n
result.append(\n propertysheet = dict().fromkeys([x.split(\'/\')[-1].split(\'.\')[0] for x in property_sheets_list]).keys()\n
ReportSection(\n result.append(\n
level=4,\n ReportSection(\n
title="Class Methods",\n level=4,\n
form_id=\'\')\n title="Class Methods",\n
)\n form_id=\'\')\n
result.append(\n )\n
ReportSection(\n result.append(\n
form_id=\'PortalTypeDocumentationHelperAppendixClassMethod_view\',\n ReportSection(\n
selection_params=dict(class_method_list=classmethod, obj=uri_object),\n form_id=\'PortalTypeDocumentationHelperAppendixClassMethod_view\',\n
selection_name=\'class_method_selection\',\n selection_params=dict(class_method_list=classmethod, obj=uri_object),\n
listbox_display_mode=\'FlatListMode\')\n selection_name=\'class_method_selection\',\n
)\n listbox_display_mode=\'FlatListMode\')\n
result.append(\n )\n
ReportSection(\n result.append(\n
level=4,\n ReportSection(\n
title="Property Sheets",\n level=4,\n
form_id=\'\')\n title="Property Sheets",\n
)\n form_id=\'\')\n
result.append(\n )\n
ReportSection(\n result.append(\n
form_id=\'PortalTypeDocumentationHelperAppendixPropertySheet_view\',\n ReportSection(\n
selection_params=dict(property_sheet_list=propertysheet, obj=uri_object),\n form_id=\'PortalTypeDocumentationHelperAppendixPropertySheet_view\',\n
selection_name=\'property_sheet_selection\',\n selection_params=dict(property_sheet_list=propertysheet, obj=uri_object),\n
listbox_display_mode=\'FlatListMode\')\n selection_name=\'property_sheet_selection\',\n
)\n listbox_display_mode=\'FlatListMode\')\n
)\n
return result\n return result\n
</string> </value> </string> </value>
</item> </item>
...@@ -267,6 +267,7 @@ return result\n ...@@ -267,6 +267,7 @@ return result\n
<string>context</string> <string>context</string>
<string>REQUEST</string> <string>REQUEST</string>
<string>True</string> <string>True</string>
<string>portal_skin</string>
<string>result</string> <string>result</string>
<string>root_class_name</string> <string>root_class_name</string>
<string>class_methods_list</string> <string>class_methods_list</string>
...@@ -278,7 +279,6 @@ return result\n ...@@ -278,7 +279,6 @@ return result\n
<string>section</string> <string>section</string>
<string>uri</string> <string>uri</string>
<string>uri_object</string> <string>uri_object</string>
<string>portal_skin</string>
<string>None</string> <string>None</string>
<string>child_uri</string> <string>child_uri</string>
<string>class_name</string> <string>class_name</string>
......
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