--- versionedFile/extVersionedFile.py 2007/10/26 22:44:30 1.14 +++ versionedFile/extVersionedFile.py 2007/11/23 17:52:34 1.15 @@ -773,8 +773,12 @@ class extVersionedFile(CatalogAware,Fold meta_type = 'extVersionedFile' # meta_type of contained objects content_meta_type = ['extVersionedFileObject'] + # default catalog for extVersionedFile objects default_catalog = 'fileCatalog' + manage_options = Folder.manage_options+({'label':'Main Config','action':'changeVersionedFileForm'},) + + security=ClassSecurityInfo() def __init__(self, id, title, lockedBy,author): @@ -1123,9 +1127,26 @@ class extVersionedFile(CatalogAware,Fold else: return ob + + changeVersionedFileForm = PageTemplateFile('zpt/changeVersionedFile', globals()) + + def manage_changeVersionedFile(self,title,vC,author,comment): + """Change VersionedFile metadata""" + self.title = title + self.author = author + cob = self.getContentObject() + if cob: + if vC: + cob.vComment=vC + + if comment=='': + cob.versionComment=None + else: + cob.versionComment=comment + def download(self): - """download and lock""" + """download""" self.REQUEST.RESPONSE.setHeader("Content-Disposition","""attachement; filename=%s"""%self.getContentObject().getId()) self.REQUEST.RESPONSE.setHeader("Content-Type","application/octet-stream") self.content_type="application/octet-stream"