version 1.44, 2005/02/10 16:17:18
|
version 1.45, 2005/04/27 13:17:45
|
Line 9 except:
|
Line 9 except:
|
print "archive not imported" |
print "archive not imported" |
|
|
import os |
import os |
|
import os.path |
from Products.PageTemplates.PageTemplateFile import PageTemplateFile |
from Products.PageTemplates.PageTemplateFile import PageTemplateFile |
from Products.PageTemplates.PageTemplate import PageTemplate |
from Products.PageTemplates.PageTemplate import PageTemplate |
import string |
import string |
Line 35 def add(self, no_upload=0):
|
Line 35 def add(self, no_upload=0):
|
#self.referencetypes=self.ZopeFind(self,obj_metatypes=['OSAS_MetadataMapping']) |
#self.referencetypes=self.ZopeFind(self,obj_metatypes=['OSAS_MetadataMapping']) |
self.referencetypes=self.ZopeFind(self) |
self.referencetypes=self.ZopeFind(self) |
|
|
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_new').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','OSAS_add_new')).__of__(self) |
self.REQUEST.SESSION['path']=self.REQUEST['path'] |
self.REQUEST.SESSION['path']=self.REQUEST['path'] |
if no_upload==0: |
if no_upload==0: |
self.REQUEST.SESSION['no_upload']='yes' |
self.REQUEST.SESSION['no_upload']='yes' |
Line 83 def add2(self):
|
Line 83 def add2(self):
|
#sorted=listed.sort() |
#sorted=listed.sort() |
#print sorted |
#print sorted |
|
|
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_bibdata').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','OSAS_add_bibdata')).__of__(self) |
return newtemplate() |
return newtemplate() |
#return self.fields |
#return self.fields |
|
|
Line 135 def add3(self):
|
Line 135 def add3(self):
|
self.REQUEST.SESSION['folder_name']=self.REQUEST.SESSION['path'] |
self.REQUEST.SESSION['folder_name']=self.REQUEST.SESSION['path'] |
return add5(self) |
return add5(self) |
else: |
else: |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_naming').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','OSAS_add_naming')).__of__(self) |
return newtemplate() |
return newtemplate() |
|
|
|
|
Line 162 def add4(self):
|
Line 162 def add4(self):
|
|
|
|
|
self.image_folder_name="pageimg" |
self.image_folder_name="pageimg" |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_upload').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','OSAS_upload')).__of__(self) |
|
|
return newtemplate() |
return newtemplate() |
|
|
Line 181 def add5(self):
|
Line 181 def add5(self):
|
except: |
except: |
pass |
pass |
|
|
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_add_metadata').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','OSAS_add_metadata')).__of__(self) |
return newtemplate() |
return newtemplate() |
|
|
def add6(self): |
def add6(self): |
Line 199 def add6(self):
|
Line 199 def add6(self):
|
if tag!="": |
if tag!="": |
self.metadataprint=self.metadataprint+"<"+tag+">"+self.metadata[tag]+"</"+tag+">\n" |
self.metadataprint=self.metadataprint+"<"+tag+">"+self.metadata[tag]+"</"+tag+">\n" |
|
|
newtemplate=PageTemplateFile('Products/OSA_system/zpt/index_meta').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','index_meta')).__of__(self) |
newtemplate.content_type="text/plain" |
newtemplate.content_type="text/plain" |
renderxml = newtemplate(encode='utf-8') |
renderxml = newtemplate(encode='utf-8') |
|
|
Line 231 def add6(self):
|
Line 231 def add6(self):
|
"""text upload""" |
"""text upload""" |
return 1 |
return 1 |
else: |
else: |
newtemplate2=PageTemplateFile('Products/OSA_system/zpt/OSAS_saved').__of__(self) |
newtemplate2=PageTemplateFile(os.path.join(package_home(globals()),'zpt','OSAS_saved')).__of__(self) |
newtemplate2.content_type="text/html" |
newtemplate2.content_type="text/html" |
self.REQUEST.response.setHeader('Content-Type','text/html') |
self.REQUEST.response.setHeader('Content-Type','text/html') |
return newtemplate2() |
return newtemplate2() |
Line 289 def addPresentation(self,path):
|
Line 289 def addPresentation(self,path):
|
|
|
self.REQUEST.SESSION['xmlvorschlag']=tmpTxt.encode('utf-8') |
self.REQUEST.SESSION['xmlvorschlag']=tmpTxt.encode('utf-8') |
|
|
newtemplate=PageTemplateFile('Products/OSA_system/zpt/addPresentation').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addPresentation')).__of__(self) |
return newtemplate() |
return newtemplate() |
|
|
def addPresentation2(self): |
def addPresentation2(self): |
Line 333 def addPdf(self,path,folder=None):
|
Line 333 def addPdf(self,path,folder=None):
|
"""add fulltext to the path""" |
"""add fulltext to the path""" |
self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing text files |
self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing text files |
self.REQUEST.SESSION['pathnew']=path |
self.REQUEST.SESSION['pathnew']=path |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/addPdf').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addPdf')).__of__(self) |
return newtemplate() |
return newtemplate() |
|
|
def addPdf2(self): |
def addPdf2(self): |
Line 367 def addText(self,path,folder=None):
|
Line 367 def addText(self,path,folder=None):
|
"""add fulltext to the path""" |
"""add fulltext to the path""" |
self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing text files |
self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing text files |
self.REQUEST.SESSION['pathnew']=path |
self.REQUEST.SESSION['pathnew']=path |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/addText').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','addText')).__of__(self) |
return newtemplate() |
return newtemplate() |
|
|
def addText2(self): |
def addText2(self): |
Line 492 def addImages(self,path):
|
Line 492 def addImages(self,path):
|
"""Imagesfolder to the path""" |
"""Imagesfolder to the path""" |
self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing pageimages files |
self.REQUEST.SESSION['existing_names']=['pageimg'] # to be done generate list of existing pageimages files |
self.REQUEST.SESSION['path']=path |
self.REQUEST.SESSION['path']=path |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_addImages').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','OSAS_addImages')).__of__(self) |
return newtemplate() |
return newtemplate() |
|
|
def addImages2(self): |
def addImages2(self): |
Line 506 def addImages2(self):
|
Line 506 def addImages2(self):
|
self.content_type='images' |
self.content_type='images' |
addDirsToIndexMeta(self.REQUEST.SESSION['path'],self.image_folder_name,self.content_description,self.content_type) |
addDirsToIndexMeta(self.REQUEST.SESSION['path'],self.image_folder_name,self.content_description,self.content_type) |
self.REQUEST.SESSION['path']=re.search(r"/mpiwg(.*)",self.REQUEST.SESSION['path']).group(1) |
self.REQUEST.SESSION['path']=re.search(r"/mpiwg(.*)",self.REQUEST.SESSION['path']).group(1) |
newtemplate=PageTemplateFile('Products/OSA_system/zpt/OSAS_upload2').__of__(self) |
newtemplate=PageTemplateFile(os.path.join(package_home(globals()),'zpt','OSAS_upload2')).__of__(self) |
return newtemplate() |
return newtemplate() |
|
|
|
|