--- versionedFile/versionedFile.py 2005/01/12 14:08:19 1.25 +++ versionedFile/versionedFile.py 2005/02/24 17:13:27 1.26 @@ -321,7 +321,24 @@ class versionedFile(Folder): meta_type="versionedFile" - + def manageCommentForm(self): + """add a comment""" + pt=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addComment')).__of__(self) + return pt() + + def manageComment(self,text,comment_author,submit,REQUEST=None): + """manage comments""" + if submit =='change': + if text=='': + self.comment=None + else: + self.comment=text + self.comment_author=comment_author + + self.comment_date=time.strftime("%Y-%m-%d %H:%M:%S",time.localtime()) + + return REQUEST.RESPONSE.redirect(self.aq_parent.absolute_url()) + def getLastVersion(self): """Last Version""" tmp=0