changeset 334:a8fb29c62b47

*** empty log message ***
author abukhman
date Mon, 18 Oct 2010 11:54:40 +0200
parents 119d415a0ce3
children a3410dc469ae
files MpdlXmlTextServer.py documentViewer.py
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Mon Oct 18 11:48:22 2010 +0200
+++ b/MpdlXmlTextServer.py	Mon Oct 18 11:54:40 2010 +0200
@@ -191,9 +191,10 @@
         pagedivs = dom.xpath("//div[@class='pageNumberOrig']")
         if len(pagedivs)>0:
             docinfo['originalPage'] = getTextFromNode(pagedivs[0])
-            return docinfo['originalPage']
+            #return docinfo['originalPage']
             #return originalPage
-            
+            return docinfo
+        
     def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""):
         """returns single page from fulltext"""
         docpath = docinfo['textURLPath']
--- a/documentViewer.py	Mon Oct 18 11:48:22 2010 +0200
+++ b/documentViewer.py	Mon Oct 18 11:54:40 2010 +0200
@@ -243,8 +243,8 @@
             self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary"
             
         docinfo = self.getDocinfo(mode=mode,url=url)
-        #pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo)
-        pageinfo = self.getPageinfo(start=start,current=pn, originalPage=originalPage, docinfo=docinfo)
+        pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo)
+        #pageinfo = self.getPageinfo(start=start,current=pn, originalPage=originalPage, docinfo=docinfo)
         ''' ZDES '''
         pt = getattr(self.template, 'thumbs_main_rss')
         
@@ -257,7 +257,7 @@
         return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode)
   
     security.declareProtected('View','index_html')
-    def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None, query=None, querySearch=None, characterNormalization="", originalPage=None):
+    def index_html(self,url,mode="texttool",viewMode="auto",tocMode="thumbs",start=None,pn=1,mk=None, query=None, querySearch=None, characterNormalization=""):
         '''
         view it
         @param mode: defines how to access the document behind url 
@@ -662,6 +662,7 @@
         presentationUrls = dom.xpath("//texttool/presentation")
         docinfo = self.getBibinfoFromIndexMeta(url, docinfo=docinfo, dom=dom)   # get info von bib tag
         docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom)
+        docinfo =self.getOrigPages(docinfo=None, pageinfo=None)
         
         if presentationUrls and (len(presentationUrls) > 0): # ueberschreibe diese durch presentation informationen 
              # presentation url ergiebt sich ersetzen von index.meta in der url der fuer die Metadaten
@@ -745,11 +746,11 @@
         self.REQUEST.SESSION['docinfo'] = docinfo
         return docinfo
                
-    def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None,characterNormalization="",originalPage=originalPage):
+    def getPageinfo(self, current, start=None, rows=None, cols=None, docinfo=None, viewMode=None, tocMode=None,characterNormalization=""):
         """returns pageinfo with the given parameters"""
         pageinfo = {}
         current = getInt(current)
-        pageinfo ['originalPage'] = originalPage
+        #pageinfo ['originalPage'] = originalPage
         pageinfo['current'] = current
         rows = int(rows or self.thumbrows)
         pageinfo['rows'] = rows