Commit d34e8c98 authored by Mayoro Diagne's avatar Mayoro Diagne

2008-09-20: mayoro

- Adding list of property sheets on portal_types in ODT mode
- Displaying list of used property sheet in appendix and source codes of those property sheets

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23720 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a6e77b0b
......@@ -71,6 +71,9 @@
except AttributeError:\n
return url.split(\'/\')[-1]\n
\n
def compareFileName(a, b):\n
return cmp(a.split(\'/\')[-1], b.split(\'/\')[-1])\n
\n
\n
from Products.ERP5Form.Report import ReportSection\n
REQUEST = context.REQUEST\n
......@@ -197,7 +200,7 @@ if portal_skin is not None and portal_skin=="ODT":\n
form_id=\'\')\n
)\n
classmethod = dict().fromkeys([x for x in class_methods_list]).keys()\n
propertysheet = dict().fromkeys([x.split(\'/\')[-1].split(\'.\')[0] for x in property_sheets_list]).keys()\n
propertysheet = dict(zip([x.split(\'/\')[-1] for x in property_sheets_list],property_sheets_list))\n
result.append(\n
ReportSection(\n
level=3,\n
......@@ -220,10 +223,23 @@ if portal_skin is not None and portal_skin=="ODT":\n
result.append(\n
ReportSection(\n
form_id=\'PortalTypeDocumentationHelperAppendixPropertySheet_view\',\n
selection_params=dict(property_sheet_list=propertysheet, obj=uri_object),\n
selection_params=dict(property_sheet_list=propertysheet.keys(), obj=uri_object),\n
selection_name=\'property_sheet_selection\',\n
listbox_display_mode=\'FlatListMode\')\n
)\n
class_name = \'PortalTypePropertySheetDocumentationHelper\'\n
propertysheets = propertysheet.values()\n
propertysheets.sort(compareFileName)\n
for uri in propertysheets:\n
result.append(\n
ReportSection(\n
path=context.getPortalObject().portal_classes.getRelativeUrl(),\n
method_id=\'getDocumentationHelper\',\n
form_id=\'%s_view\' % class_name,\n
param_list=[class_name,\n
uri],\n
listbox_display_mode=\'FlatListMode\')\n
)\n
return result\n
</string> </value>
</item>
......@@ -268,6 +284,7 @@ return result\n
<value>
<tuple>
<string>getTitle</string>
<string>compareFileName</string>
<string>Products.ERP5Form.Report</string>
<string>ReportSection</string>
<string>_getattr_</string>
......@@ -300,7 +317,9 @@ return result\n
<string>$append0</string>
<string>x</string>
<string>classmethod</string>
<string>zip</string>
<string>propertysheet</string>
<string>propertysheets</string>
</tuple>
</value>
</item>
......
......@@ -19,7 +19,6 @@
<string>list_method</string>
<string>selection_name</string>
<string>url_columns</string>
<string>enabled</string>
</list>
</value>
</item>
......@@ -69,12 +68,6 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
......@@ -131,10 +124,6 @@
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
......@@ -146,7 +135,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
......@@ -179,22 +168,6 @@
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here. PortalTypeDocumentationHeper_getListboxVisibilityFromContext()</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="Method" module="Products.Formulator.MethodField"/>
......
104
\ No newline at end of file
107
\ 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