version 1.14, 2007/10/26 22:44:30
|
version 1.15, 2007/11/23 17:52:34
|
Line 773 class extVersionedFile(CatalogAware,Fold
|
Line 773 class extVersionedFile(CatalogAware,Fold
|
meta_type = 'extVersionedFile' |
meta_type = 'extVersionedFile' |
# meta_type of contained objects |
# meta_type of contained objects |
content_meta_type = ['extVersionedFileObject'] |
content_meta_type = ['extVersionedFileObject'] |
|
# default catalog for extVersionedFile objects |
default_catalog = 'fileCatalog' |
default_catalog = 'fileCatalog' |
|
|
|
manage_options = Folder.manage_options+({'label':'Main Config','action':'changeVersionedFileForm'},) |
|
|
|
|
security=ClassSecurityInfo() |
security=ClassSecurityInfo() |
|
|
def __init__(self, id, title, lockedBy,author): |
def __init__(self, id, title, lockedBy,author): |
Line 1124 class extVersionedFile(CatalogAware,Fold
|
Line 1128 class extVersionedFile(CatalogAware,Fold
|
return ob |
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): |
def download(self): |
"""download and lock""" |
"""download""" |
self.REQUEST.RESPONSE.setHeader("Content-Disposition","""attachement; filename=%s"""%self.getContentObject().getId()) |
self.REQUEST.RESPONSE.setHeader("Content-Disposition","""attachement; filename=%s"""%self.getContentObject().getId()) |
self.REQUEST.RESPONSE.setHeader("Content-Type","application/octet-stream") |
self.REQUEST.RESPONSE.setHeader("Content-Type","application/octet-stream") |
self.content_type="application/octet-stream" |
self.content_type="application/octet-stream" |