Commit 2829b8d3 authored by Mayoro Diagne's avatar Mayoro Diagne

adding description in documentation of PageTemplates, in ODT mode use this...

adding description in documentation of PageTemplates, in ODT mode use this description instead of whole Page Templates's source code

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24152 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 63f266eb
...@@ -64,6 +64,14 @@ class PageTemplateDocumentationHelper(DocumentationHelper): ...@@ -64,6 +64,14 @@ class PageTemplateDocumentationHelper(DocumentationHelper):
""" """
return getattr(self.getDocumentedObject(), "title", '') return getattr(self.getDocumentedObject(), "title", '')
security.declareProtected(Permissions.AccessContentsInformation, 'getDescription' )
def getDescription(self):
"""
Returns the description of the documentation helper
"""
return getattr(self.getDocumentedObject(), "description", '')
security.declareProtected( Permissions.AccessContentsInformation, 'getSourceCode' ) security.declareProtected( Permissions.AccessContentsInformation, 'getSourceCode' )
def getSourceCode(self): def getSourceCode(self):
""" """
...@@ -76,7 +84,7 @@ class PageTemplateDocumentationHelper(DocumentationHelper): ...@@ -76,7 +84,7 @@ class PageTemplateDocumentationHelper(DocumentationHelper):
REQUEST = getattr(self, 'REQUEST', None) REQUEST = getattr(self, 'REQUEST', None)
if REQUEST is not None: if REQUEST is not None:
if REQUEST.get('portal_skin', 'View' ) != 'View': if REQUEST.get('portal_skin', 'View' ) != 'View':
return source_code return getattr(self.getDocumentedObject(), "description", '')
else: else:
LOG('DCWorkflowScriptDocumentationHelper', INFO, LOG('DCWorkflowScriptDocumentationHelper', INFO,
'Transformation Tool is not installed. No convertion of python script to html') '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