version 1.24, 2007/05/03 17:28:23
|
version 1.26, 2007/05/04 13:17:02
|
Line 80 class documentViewer(Folder):
|
Line 80 class documentViewer(Folder):
|
image_main = PageTemplateFile('zpt/image_main', globals()) |
image_main = PageTemplateFile('zpt/image_main', globals()) |
head_main = PageTemplateFile('zpt/head_main', globals()) |
head_main = PageTemplateFile('zpt/head_main', globals()) |
docuviewer_css = PageTemplateFile('css/docuviewer.css', globals()) |
docuviewer_css = PageTemplateFile('css/docuviewer.css', globals()) |
|
info_xml = PageTemplateFile('zpt/info_xml', globals()) |
|
|
security.declareProtected('View management screens','changeDocumentViewerForm') |
security.declareProtected('View management screens','changeDocumentViewerForm') |
changeDocumentViewerForm = PageTemplateFile('zpt/changeDocumentViewer', globals()) |
changeDocumentViewerForm = PageTemplateFile('zpt/changeDocumentViewer', globals()) |
Line 108 class documentViewer(Folder):
|
Line 109 class documentViewer(Folder):
|
def index_html(self,mode,url,viewMode="auto",start=None,pn=1): |
def index_html(self,mode,url,viewMode="auto",start=None,pn=1): |
''' |
''' |
view it |
view it |
@param mode: defines which type of document is behind url (text,images or auto) |
@param mode: defines how to access the document behind url |
@param url: url which contains display information |
@param url: url which contains display information |
@param viewMode: if images display images, if text display text, default is images |
@param viewMode: if images display images, if text display text, default is images (text,images or auto) |
|
|
''' |
''' |
|
|
Line 133 class documentViewer(Folder):
|
Line 134 class documentViewer(Folder):
|
else: |
else: |
viewMode="images" |
viewMode="images" |
|
|
|
|
return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode) |
return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode) |
|
|
|
|
Line 153 class documentViewer(Folder):
|
Line 153 class documentViewer(Folder):
|
return url |
return url |
|
|
|
|
|
def getInfo_xml(self,url,mode): |
|
"""returns info about the document as XML""" |
|
|
|
if not self.digilibBaseUrl: |
|
self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary" |
|
|
|
docinfo = self.getDocinfo(mode=mode,url=url) |
|
pt = getattr(self.template, 'info_xml') |
|
return pt(docinfo=docinfo) |
|
|
|
|
def getStyle(self, idx, selected, style=""): |
def getStyle(self, idx, selected, style=""): |
"""returns a string with the given style and append 'sel' if path == selected.""" |
"""returns a string with the given style and append 'sel' if path == selected.""" |
#logger("documentViewer (getstyle)", logging.INFO, "idx: %s selected: %s style: %s"%(idx,selected,style)) |
#logger("documentViewer (getstyle)", logging.INFO, "idx: %s selected: %s style: %s"%(idx,selected,style)) |
Line 409 class documentViewer(Folder):
|
Line 420 class documentViewer(Folder):
|
presentationUrl=url.replace('index.meta',getTextFromNode(presentationUrls[0])) |
presentationUrl=url.replace('index.meta',getTextFromNode(presentationUrls[0])) |
docinfo = self.getBibinfoFromTextToolPresentation(presentationUrl,docinfo=docinfo,dom=dom) |
docinfo = self.getBibinfoFromTextToolPresentation(presentationUrl,docinfo=docinfo,dom=dom) |
|
|
docinfo = self.getAuthinfoFromIndexMeta(path,docinfo=docinfo) |
docinfo = self.getAuthinfoFromIndexMeta(url,docinfo=docinfo,dom=dom) # get access info |
return docinfo |
return docinfo |
|
|
|
|