Commit c8b9e47f authored by Mayoro Diagne's avatar Mayoro Diagne

display only docstring of python scripts on ODT mode

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24069 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4435e241
......@@ -271,4 +271,10 @@ class BusinessTemplateDocumentationHelper(DocumentationHelper):
base_uri = '/'+self.uri.split('/')[1]+'/portal_catalog'
return map(lambda x: ('%s/%s' % (base_uri, x)), catalog_method_list)
security.declareProtected( Permissions.AccessContentsInformation, 'getTemplatePathList' )
def getTemplatePathList(self):
"""
"""
return self.getDocumentedObject().getTemplatePathList()
InitializeClass(BusinessTemplateDocumentationHelper)
......@@ -93,7 +93,11 @@ class DCWorkflowScriptDocumentationHelper(DocumentationHelper):
REQUEST = getattr(self, 'REQUEST', None)
if REQUEST is not None:
if REQUEST.get('portal_skin', 'View' ) != 'View':
return source_code
doc_string = source_code.split('"""')
if len(doc_string)>1:
return doc_string[1]
else:
return ""
else:
LOG('DCWorkflowScriptDocumentationHelper', INFO,
'Transformation Tool is not installed. No convertion of python script to html')
......
......@@ -80,7 +80,11 @@ class PortalTypePropertySheetDocumentationHelper(DocumentationHelper):
REQUEST = getattr(self, 'REQUEST', None)
if REQUEST is not None:
if REQUEST.get('portal_skin', 'View' ) != 'View':
return source_code
doc_string = source_code.split('"""')
if len(doc_string)>1:
return doc_string[1]
else:
return ""
else:
LOG('DCWorkflowScriptDocumentationHelper', INFO,
'Transformation Tool is not installed. No convertion of python script to html')
......
......@@ -75,7 +75,11 @@ class ScriptPythonDocumentationHelper(DocumentationHelper):
REQUEST = getattr(self, 'REQUEST', None)
if REQUEST is not None:
if REQUEST.get('portal_skin', 'View' ) != 'View':
return source_code
doc_string = source_code.split('"""')
if len(doc_string)>1:
return doc_string[1]
else:
return ""
else:
LOG('DCWorkflowScriptDocumentationHelper', INFO,
'Transformation Tool is not installed. No convertion of python script to html')
......
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