Index: documentViewer.py
===================================================================
--- documentViewer.py	(revision 498)
+++ documentViewer.py	(revision 499)
@@ -117,16 +117,9 @@
     viewer_text = PageTemplateFile('zpt/viewer_text', globals())
     viewer_images = PageTemplateFile('zpt/viewer_images', globals())
-    viewer_main = PageTemplateFile('zpt/viewer_main', globals())
+    viewer_index = PageTemplateFile('zpt/viewer_index', globals())
     toc_thumbs = PageTemplateFile('zpt/toc_thumbs', globals())
     toc_text = PageTemplateFile('zpt/toc_text', globals())
     toc_figures = PageTemplateFile('zpt/toc_figures', globals())
     toc_none = PageTemplateFile('zpt/toc_none', globals())
-    page_main_images = PageTemplateFile('zpt/page_main_images', globals())
-    page_main_double = PageTemplateFile('zpt/page_main_double', globals())
-    page_main_text = PageTemplateFile('zpt/page_main_text', globals())
-    page_main_text_dict = PageTemplateFile('zpt/page_main_text_dict', globals())
-    page_main_gis =PageTemplateFile ('zpt/page_main_gis', globals())
-    page_main_xml = PageTemplateFile('zpt/page_main_xml', globals())
-    page_main_pureXml = PageTemplateFile('zpt/page_main_pureXml', globals())
     head_main = PageTemplateFile('zpt/head_main', globals())
     info_xml = PageTemplateFile('zpt/info_xml', globals())
@@ -135,7 +128,4 @@
     docuviewer_css.index_html = refreshingImageFileIndexHtml
     
-    
-    thumbs_main_rss = PageTemplateFile('zpt/thumbs_main_rss', globals())
-
     
     def __init__(self,id,imageScalerUrl=None,textServerName=None,title="",digilibBaseUrl=None,thumbcols=2,thumbrows=5,authgroups="mpiwg"):
@@ -182,4 +172,12 @@
         """returns full text content of page"""
         return self.template.fulltextclient.getTextPage(**args)
+
+    def getToc(self, **args):
+        """returns the full table of contents (in internal format)"""
+        return self.template.fulltextclient.getToc(**args)
+
+    def getTocPage(self, **args):
+        """returns one page of the table of contents"""
+        return self.template.fulltextclient.getTocPage(**args)
 
     #WTF?
@@ -223,13 +221,6 @@
         return self.template.fulltextclient.getLex(**args)
 
-    def getToc(self, **args):
-        """returns the full table of contents (in internal format)"""
-        return self.template.fulltextclient.getToc(**args)
-
-    def getTocPage(self, **args):
-        """returns one page of the table of contents"""
-        return self.template.fulltextclient.getTocPage(**args)
-
-    
+    #WTF?
+    thumbs_main_rss = PageTemplateFile('zpt/thumbs_main_rss', globals())
     security.declareProtected('View','thumbs_rss')
     def thumbs_rss(self,mode,url,viewMode="auto",start=None,pn=1):
Index: zpt/viewer_index.zpt
===================================================================
--- zpt/viewer_index.zpt	(revision 499)
+++ zpt/viewer_index.zpt	(revision 499)
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+  tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode;
+                  tocMode pageinfo/tocMode; viewType pageinfo/viewType; viewerUrl docinfo/viewerUrl;
+                  numPages docinfo/numPages | nothing;">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
+<link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
+</head>
+<body tal:condition="numPages">
+  <tal:block
+    tal:define="docpath docinfo/textURLPath; 
+                query nothing;">
+    <table width="98%">
+      <tr>
+        <td valign="top">
+              <a href="http://echo.mpiwg-berlin.mpg.de/content">
+                <img border="0" src="images/logo.png" align="top" alt=""/>
+              </a>
+            </td>
+        <td valign="top" align="right">
+          <!--<b><span>home</span>&nbsp;&nbsp;&nbsp;<span>contact</span>&nbsp;&nbsp;&nbsp;<span>help</span></b>-->
+        </td>
+        <td valign="top" align="right">
+          <!--BEGIN search -->
+          <form tal:condition="docpath" tal:attributes="action python:here.getLink()">
+                <input type="hidden" tal:define="params python:here.getParams('viewMode', None)" tal:repeat="param params" tal:attributes="name param; value python:params[param]"/>
+        <input class="textMain" name="query" onfocus="this.select();"  type="text" tal:attributes="value query"/>
+        <input type="submit" class="buttonMain" value="Search in Book"/>           
+          </form>
+          <!-- END search-->
+        </td>
+      </tr>
+    </table>
+    <table border="0">
+      <tr>
+        <td valign="top">
+          <a tal:define="tp docinfo/titlePage | nothing" tal:attributes="href python:context.getLink('viewMode','auto')">
+        <img tal:condition="tp" border="0" tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500"/>
+        <img tal:condition="not:tp" border="0" src="images/oldbook.png"/>
+          </a>
+        </td>
+        <td valign="top">
+              <table border=0 id="bibinfo" tal:define="formattedData python:here.metadata.getFormattedMetaDataExtended(bibdata=docinfo.get('bib', None))">
+            <!-- wenn es bibinfo in docinfo gibt -->
+
+            <tal:x condition="python:formattedData">
+              <div tal:replace="structure python:formattedData"/>
+              <!-- <div><a href="javascript:showExtendedMetadata(1)">extended</a></div> -->
+                  <div tal:condition="exists:docinfo/attribution" tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=docinfo['attribution'])"/>
+                  <div tal:condition="exists:docinfo/copyright" tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=docinfo['copyright'])"/>
+            </tal:x>
+
+            <!-- kein template fuer die daten -->
+            <tal:x condition="python:formattedData==None">
+              <tal:x condition="exists:docinfo/bib">
+                <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
+                  <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'"/>
+                  <td class="content" tal:content="bibinfo/bib"/>
+                </tr>
+              </tal:x>
+              
+              <!-- wenn es keine bibinfo gibt (archimedes-texte) -->
+              <tal:y condition="not:exists:docinfo/bib">
+                <tr>
+                  <td class="type">Author:</td>
+                  <td class="content" tal:content="python:docinfo['creator']"/>
+                </tr>
+                <tr>
+                  <td class="type">Title:</td>
+                  <td class="content" tal:content="python:docinfo['title']"/>
+                </tr>
+                <tr>
+                  <td class="type">Year:</td>
+                  <td class="content" tal:content="python:docinfo['date']"/>
+                </tr>
+              </tal:y>
+            </tal:x> <!-- ende kein template fuer die daten -->
+              </table>
+
+          <br/><br/><br/><br/><br/><br/>
+          <table border="0" width="100%">
+        <tr>
+          <td>
+            <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">Access Book</a>
+          </td>
+        </tr>
+        
+        <tr tal:condition="docpath">
+          <td class="openbutton1">Download: 
+            <a tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s.html'%(docpath.replace('.xml','.html'))" target="_blank">html</a> 
+            /
+            <a tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">xml</a>
+          </td>
+        </tr>
+          </table>
+        </td>
+      </tr>
+    </table>
+
+</tal:block>
+</body>
+<body tal:condition="not:numPages">
+  <div class="errortext">Sorry, document doesn't exist.</div>
+</body>
+</html>
