version 1.80, 2008/10/08 10:51:53
|
version 1.83, 2008/11/16 12:15:42
|
Line 524 class VLP_collection(ECHO_collection,Acq
|
Line 524 class VLP_collection(ECHO_collection,Acq
|
|
|
if name.startswith("lit"): #umleitung wenn lit aufgerufen wirk |
if name.startswith("lit"): #umleitung wenn lit aufgerufen wirk |
# umleitung auf den eigentlichen folder nur wenn direkt der Folder litXXX oder dessen index_html methode aufgerufen wird |
# umleitung auf den eigentlichen folder nur wenn direkt der Folder litXXX oder dessen index_html methode aufgerufen wird |
if lastActual.startswith("lit") or (lastActual=="index_html"): |
if lastActual.startswith("lit") or (lastActual=="index_html") or (lastActual=="index_meta"): |
#obj=self. ZopeFind(self,obj_ids=[name],search_sub=1) |
#obj=self. ZopeFind(self,obj_ids=[name],search_sub=1) |
ob=self.findObjFromLitName(name) |
ob=self.findObjFromLitName(name) |
if not ob: |
if not ob: |
Line 533 class VLP_collection(ECHO_collection,Acq
|
Line 533 class VLP_collection(ECHO_collection,Acq
|
|
|
logging.error("request:"+repr(ob)) |
logging.error("request:"+repr(ob)) |
request.response.setStatus(200) |
request.response.setStatus(200) |
|
#if (lastActual=="index_meta"): |
|
# logging.debug("index_meta requested") |
|
# return ob.index_meta |
return ob |
return ob |
|
|
else: ## andern falls transversiere zum parent. |
else: ## andern falls transversiere zum parent. |
obj = self.aq_parent |
obj = self.aq_parent |
return obj |
return obj |
Line 553 class VLP_collection(ECHO_collection,Acq
|
Line 557 class VLP_collection(ECHO_collection,Acq
|
{'label':'Update Library','action':'updateCollection'}, |
{'label':'Update Library','action':'updateCollection'}, |
{'label':'Update Metadata','action':'updateCollectionMD'}, |
{'label':'Update Metadata','action':'updateCollectionMD'}, |
) |
) |
|
def getAllRessources(self): |
|
"""getallressources""" |
|
res=self.ZopeFind(self,obj_metatypes=['VLP_resource'],search_sub=1) |
|
ret=[] |
|
for r in res: |
|
ret.append([r[0],r[1].absolute_url()]) |
|
|
|
return ret |
|
|
def generateSubCollections(self,errorsTXT="",forceUpdate=False,RESPONSE=None): |
def generateSubCollections(self,errorsTXT="",forceUpdate=False,RESPONSE=None): |
"""erzeuge subcollectionen""" |
"""erzeuge subcollectionen""" |
Line 955 class VLP_resource(ECHO_resource,Cacheab
|
Line 967 class VLP_resource(ECHO_resource,Cacheab
|
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
|
def index_meta(self): |
def index_meta(self,RESPONSE=None): |
"""index_meta""" |
"""index_meta""" |
|
|
pt=PageTemplateFile(os.path.join(package_home(globals()),'vlp','index_meta.zpt')).__of__(self) |
pt=PageTemplateFile(os.path.join(package_home(globals()),'vlp','index_meta.zpt')).__of__(self) |
pt.content_type="text/html" |
pt.content_type="text/xml" |
return pt() |
x= pt.pt_render() |
|
#logging.debug("index_meta 4:"+x) |
|
if RESPONSE: |
|
RESPONSE.setHeader("Content-Type","text/xml") |
|
return x |
def file2page(self,p): |
def file2page(self,p): |
"""converts filename to pagenumber""" |
"""converts filename to pagenumber""" |
|
|