version 1.124, 2004/06/22 08:49:00
|
version 1.127, 2004/06/23 13:00:58
|
Line 484 class ECHO_resource(Folder,Persistent):
|
Line 484 class ECHO_resource(Folder,Persistent):
|
|
|
getSubCols = ECHO_helpers.getSubCols |
getSubCols = ECHO_helpers.getSubCols |
|
|
|
def setStartPageForm(self): |
|
"""Form for changing the startpage""" |
|
|
|
|
|
pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_resourceStartPage.zpt').__of__(self) |
|
pt.content_type="text/html" |
|
return pt() |
|
|
|
|
def setStartPage(self,startpage=None,RESPONSE=None): |
def setStartPage(self,startpage=None,RESPONSE=None): |
"""set start page, if no startpage defined use the generic one of the resource""" |
"""set start page, if no startpage defined use the generic one of the resource""" |
|
|
if not startpage: |
if (not (type(startpage)==StringType)) and ("__generic" in startpage): # checke ob generic in der liste |
startpage=self.absolute_url()+"/startpage_html" |
startpage=self.absolute_url()+"/startpage_html" |
|
|
|
if (not startpage) or (startpage=="__generic"): |
|
startpage=self.absolute_url()+"/startpage_html" |
|
|
|
|
params="startpage=%s"%startpage |
params="startpage=%s"%startpage |
|
|
|
|
urllib.urlopen('http://xserve02.mpiwg-berlin.mpg.de:18880/echo_nav/storage/downloadExternalXML?index_meta_url=%s&xml_url=%s'%(self.metalink,self.absolute_url()+'/newMetaXML'+urllib.quote('?'+params))).read() |
urllib.urlopen('http://xserve02.mpiwg-berlin.mpg.de:18880/echo_nav/storage/downloadExternalXML?index_meta_url=%s&xml_url=%s'%(self.metalink,self.absolute_url()+'/newMetaXML'+urllib.quote('?'+params))).read() |
|
|
|
|
path=self.metalink |
path=self.metalink |
|
|
path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server |
path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server |
Line 505 class ECHO_resource(Folder,Persistent):
|
Line 516 class ECHO_resource(Folder,Persistent):
|
path=re.sub('/index.meta','',path) |
path=re.sub('/index.meta','',path) |
|
|
|
|
print urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() |
urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() |
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 540 class ECHO_resource(Folder,Persistent):
|
Line 551 class ECHO_resource(Folder,Persistent):
|
paramList=['project','startpage','xslt','thumbtemplate','topbar','digiLibTemplate'] |
paramList=['project','startpage','xslt','thumbtemplate','topbar','digiLibTemplate'] |
|
|
|
|
#print writeMetadata(self.metalink,self.metaDataHash,project,startpage,xslt,thumbtemplate,topbar,digiLibTemplate) |
writeMetadata(self.metalink,self.metaDataHash,project,None,xslt,thumbtemplate,topbar,digiLibTemplate) |
|
|
params="project=%s&xslt=%s&thumbtemplate=%s&topbar=%s&digiLibTemplate=%s"%(project,xslt,thumbtemplate,topbar,digiLibTemplate) |
params="project=%s&xslt=%s&thumbtemplate=%s&topbar=%s&digiLibTemplate=%s"%(project,xslt,thumbtemplate,topbar,digiLibTemplate) |
|
|
Line 550 class ECHO_resource(Folder,Persistent):
|
Line 561 class ECHO_resource(Folder,Persistent):
|
# hack Pfad auf die Dokumente |
# hack Pfad auf die Dokumente |
path=self.metalink |
path=self.metalink |
|
|
path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server |
|
path=re.sub('http://foxridge.mpiwg-berlin.mpg.de','',path) # falls foxridge als server |
|
|
|
path=re.sub('/index.meta','',path) |
path=re.sub('/index.meta','',path) |
|
|
|
path=re.sub(self.REQUEST['SERVER_URL'],'',path) |
|
path=re.sub('http://'+self.REQUEST['HTTP_HOST'],'',path) |
|
|
|
path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server |
|
path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server |
|
path=re.sub('http://foxridge.mpiwg-berlin.mpg.de','',path) # falls foxridge als server |
|
|
|
|
print urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() |
return urllib.urlopen("http://nausikaa2.rz-berlin.mpg.de:86/cgi-bin/toc/admin/reg.cgi?path=%s"%path).readlines() |
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 604 class ECHO_resource(Folder,Persistent):
|
Line 621 class ECHO_resource(Folder,Persistent):
|
def getCopyrightsHTML(self): |
def getCopyrightsHTML(self): |
"""gib (link auf copyright notiz, mediatyp, institution, copyrightType, label von copyrightType) aus""" |
"""gib (link auf copyright notiz, mediatyp, institution, copyrightType, label von copyrightType) aus""" |
|
|
if hasattr(self,'copyrightModell'): |
if hasattr(self,'copyrightModel'): |
obj=self.copyrightModell |
obj=self.copyrightModel |
|
|
else: |
else: |
return "ERROR" |
return "ERROR" |
Line 860 class ECHO_resource(Folder,Persistent):
|
Line 877 class ECHO_resource(Folder,Persistent):
|
{'label':'Add coords','action':'ECHO_graphicEntry'}, |
{'label':'Add coords','action':'ECHO_graphicEntry'}, |
{'label':'Sync Metadata','action':'ECHO_getResourceMD'}, |
{'label':'Sync Metadata','action':'ECHO_getResourceMD'}, |
{'label':'Change TemplateSets','action':'changeViewerTemplateSetForm'}, |
{'label':'Change TemplateSets','action':'changeViewerTemplateSetForm'}, |
|
{'label':'set/change startpage','action':'setStartPageForm'}, |
) |
) |
|
|
def getOverview(self): |
def getOverview(self): |