Commit 19a2dfcd authored by Jérome Perrin's avatar Jérome Perrin

ERP5Type: a missing docstrings on text_content_history

parent 4427a1ff
...@@ -32,12 +32,16 @@ from Products.ERP5Type import Permissions ...@@ -32,12 +32,16 @@ from Products.ERP5Type import Permissions
class TextContentHistoryMixin: class TextContentHistoryMixin:
"""Mixin that provides access to history of edit of the text content property.
To be used with erp5_code_mirror
"""
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
'getTextContentHistoryRevisionDictList') 'getTextContentHistoryRevisionDictList')
def getTextContentHistoryRevisionDictList(self, limit=100): def getTextContentHistoryRevisionDictList(self, limit=100):
"""TODO """Returns the history of edition as a list of dictionnaries.
""" """
history_dict_list = self._p_jar.db().history(self._p_oid, size=limit) history_dict_list = self._p_jar.db().history(self._p_oid, size=limit)
if history_dict_list is None: if history_dict_list is None:
...@@ -66,7 +70,7 @@ class TextContentHistoryMixin: ...@@ -66,7 +70,7 @@ class TextContentHistoryMixin:
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
'getTextContentHistory') 'getTextContentHistory')
def getTextContentHistory(self, key): def getTextContentHistory(self, key):
"""TODO """Returns the text content of a previous version of the document.
""" """
from struct import pack from struct import pack
from OFS.History import historicalRevision from OFS.History import historicalRevision
......
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