version 1.118, 2004/06/18 10:17:58
|
version 1.119, 2004/06/18 12:32:21
|
Line 488 class ECHO_resource(Folder,Persistent):
|
Line 488 class ECHO_resource(Folder,Persistent):
|
return "<error>no fulltext available</error>" |
return "<error>no fulltext available</error>" |
|
|
def getCopyrightsHTML(self): |
def getCopyrightsHTML(self): |
"""gib link auf copyright notiz aus""" |
"""gib (link auf copyright notiz, mediatyp, institution, copyrightType, label von copyrightType) aus""" |
|
|
if hasattr(self,'copyrightModell'): |
if hasattr(self,'copyrightModell'): |
obj=self.copyrightModell |
obj=self.copyrightModell |
Line 502 class ECHO_resource(Folder,Persistent):
|
Line 502 class ECHO_resource(Folder,Persistent):
|
link="copyrightTypes/"+copyright[2]+'/copyright.html' |
link="copyrightTypes/"+copyright[2]+'/copyright.html' |
|
|
try: |
try: |
label=getattr(self.copyrightTypes,copyright[2]).label |
copyrightTypeObj=getattr(self.copyrightTypes,copyright[2]) |
|
label=copyrightTypeObj.label |
|
url=copyrightTypeObj.url |
|
|
|
if url!='': |
|
ret.append(("""<a target="_blank" href="%s">%s</a>"""%(url,label),copyright[0],copyright[1],copyright[2],label)) |
|
else: |
|
if hasattr(copyrightTypeObj, 'copyright.html'): |
ret.append(("""<a target="_blank" href="%s?partner=%s">%s</a>"""%(link,copyright[1],label),copyright[0],copyright[1],copyright[2],label)) |
ret.append(("""<a target="_blank" href="%s?partner=%s">%s</a>"""%(link,copyright[1],label),copyright[0],copyright[1],copyright[2],label)) |
|
else: |
|
ret.append((label,copyright[0],copyright[1],copyright[2],label)) |
except: |
except: |
"""nothing""" |
"""nothing""" |
|
|
Line 2359 class ECHO_copyrightType(Folder):
|
Line 2368 class ECHO_copyrightType(Folder):
|
|
|
meta_type="ECHO_copyrightType" |
meta_type="ECHO_copyrightType" |
|
|
def __init__(self,id,title,label): |
def __init__(self,id,title,label,url): |
"""init""" |
"""init""" |
self.id=id |
self.id=id |
self.title=title |
self.title=title |
self.label=label |
self.label=label |
|
self.url=url |
|
|
manage_options = Folder.manage_options+( |
manage_options = Folder.manage_options+( |
{'label':'Main Config','action':'ECHO_copyrightType_config_mainForm'}, |
{'label':'Main Config','action':'ECHO_copyrightType_config_mainForm'}, |
Line 2375 class ECHO_copyrightType(Folder):
|
Line 2385 class ECHO_copyrightType(Folder):
|
pt.content_type="text/html" |
pt.content_type="text/html" |
return pt() |
return pt() |
|
|
def ECHO_copyrightType_config_main(self,title,label,RESPONSE=None): |
def ECHO_copyrightType_config_main(self,title,label,url,RESPONSE=None): |
"""change""" |
"""change""" |
self.title=title |
self.title=title |
self.label=label |
self.label=label |
|
self.url=url |
|
|
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
Line 2389 def manage_addECHO_copyrightTypeForm(sel
|
Line 2400 def manage_addECHO_copyrightTypeForm(sel
|
return pt() |
return pt() |
|
|
|
|
def manage_addECHO_copyrightType(self,id,title,label,RESPONSE=None): |
def manage_addECHO_copyrightType(self,id,title,label,url,RESPONSE=None): |
"""addaresource""" |
"""addaresource""" |
|
|
newObj=ECHO_copyrightType(id,title,label) |
newObj=ECHO_copyrightType(id,title,label,url) |
|
|
self._setObject(id,newObj) |
self._setObject(id,newObj) |
|
|