Commit 0f35f09f authored by Mayoro Diagne's avatar Mayoro Diagne

adding description in documentation of ERP5 Form

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24153 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2829b8d3
......@@ -70,4 +70,11 @@ class ERP5FormDocumentationHelper(DocumentationHelper):
"""
return getattr(self.getDocumentedObject(), "encoding", '')
security.declareProtected(Permissions.AccessContentsInformation, 'getDescription' )
def getDescription(self):
"""
Returns the description of the documentation helper
"""
return getattr(self.getDocumentedObject(), "description", '')
InitializeClass(ERP5FormDocumentationHelper)
......@@ -84,7 +84,7 @@ class PageTemplateDocumentationHelper(DocumentationHelper):
REQUEST = getattr(self, 'REQUEST', None)
if REQUEST is not None:
if REQUEST.get('portal_skin', 'View' ) != 'View':
return getattr(self.getDocumentedObject(), "description", '')
return source_code
else:
LOG('DCWorkflowScriptDocumentationHelper', INFO,
'Transformation Tool is not installed. No convertion of python script to html')
......
......@@ -140,7 +140,10 @@ class SkinFolderDocumentationHelper(DocumentationHelper):
if files is not None:
for file in files.objectValues():
if not meta_type or file.meta_type == meta_type:
file_list.append((file.id, file.title, file.meta_type))
file_list.append((file.id,
getattr(file, "title", ""),
getattr(file, "description", ""),
getattr(file, "meta_type", "")))
return file_list
security.declareProtected( Permissions.AccessContentsInformation, 'getFileURIList' )
def getFileURIList(self, meta_type=None):
......
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