Index: zpt/layer_index_extended.zpt
===================================================================
--- zpt/layer_index_extended.zpt	(revision 559)
+++ zpt/layer_index_extended.zpt	(revision 559)
@@ -0,0 +1,27 @@
+<!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">
+<head>
+<!-- redefine formatted data -->
+<metal:block metal:define-macro="html_head">
+  <tal:block tal:condition="python:'extended' in viewLayers">
+    <tal:block tal:define="global formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None),bibxdata=docinfo.get('bibx', None));"/>
+  </tal:block>
+</metal:block>
+</head>
+<body>
+  <!-- right-side options -->
+  <div class="col buttons">
+    <!-- LAYER DISPLAY OPTION  -->
+    <ul>
+      <metal:block metal:define-macro="layer_select_li">
+        <li>
+          <input type="checkbox" class="autosubmit" name="viewLayer" value="extended"
+            tal:attributes="checked python:'extended' in viewLayers" /> All entries
+        </li>
+      </metal:block>
+    </ul>
+  </div>
+</body>
+
+</html>
Index: zpt/viewer_index.zpt
===================================================================
--- zpt/viewer_index.zpt	(revision 558)
+++ zpt/viewer_index.zpt	(revision 559)
@@ -8,12 +8,25 @@
                   docpath docinfo/textURLPath | nothing;
                   query nothing;
-                  numPages docinfo/numPages | nothing;">
+                  numPages docinfo/numPages | nothing;
+                  global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));">
 <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" />
-<!--  layer headers (rendered always) -->
+<link rel="stylesheet" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" />
+<script type="text/javascript" tal:attributes="src string:$viewerUrl/template/jquery_js"></script>
+<script type="text/javascript">
+// <!--
+  $(document).ready(function() {
+    // autosubmit forms
+    $('form.autosubmit').find('.autosubmit').change(function() {
+      this.form.submit();
+    });
+    $('form.autosubmit input[type="submit"]').hide();
+  });
+// -->
+</script>
+<!--  layer headers (all available) -->
 <tal:block tal:repeat="layer availableLayers">
-  <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)">
+  <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/html_head" tal:condition="python:exists(mpath)">
     <metal:block metal:use-macro="python:path(mpath)" />
   </tal:block>
@@ -38,8 +51,8 @@
 
     <div class="col main">
+     <!-- main content column --> 
       <div class="index-info">
         <h2>Bibliographic information</h2>
-        <table border="0"
-          tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None),bibxdata=docinfo.get('bibx', None))">
+        <table border="0">
           <tal:x condition="python:formattedData">
             <!-- wenn es bibinfo in docinfo gibt -->
@@ -82,9 +95,9 @@
               <td class="content" tal:content="dri" />
             </tr>
-            <tr>
+            <!-- <tr>
               <td class="type">Permanent URL:</td>
               <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri"
                 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td>
-            </tr>
+            </tr> -->
           </table>
         </tal:block>
@@ -114,24 +127,8 @@
         </tal:block>
       </div>
-    </div>
+    </div> <!-- /main content column --> 
+    
     <div class="col buttons">
-      <div class="options">
-        <h4>Metadata</h4>
-        <form tal:attributes="action viewerUrl" class="autosubmit">
-          <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})"
-            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
-          <ul>
-            <!-- text layer select buttons (rendered always) -->
-            <tal:block tal:repeat="layer availableLayers">
-              <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li"
-                tal:condition="python:exists(mpath)">
-                <li metal:use-macro="python:path(mpath)" />
-              </tal:block>
-            </tal:block>
-          </ul>
-          <input type="submit" value="Go!" />
-        </form>
-      </div>
-
+      <!-- option block column --> 
       <div class="options">
         <h4>Browse</h4>
@@ -145,9 +142,9 @@
         Download full document
         <ul class="list">
-          <li><a target="_blank"
-            tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))"
+          <li><a target="_blank" rel="nofollow" class="download"
+            tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)"
             target="_blank">as HTML</a></li>
-          <li><a target="_blank"
-            tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">as
+          <li><a target="_blank" rel="nofollow" class="download"
+            tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as
               XML</a></li>
         </ul>
@@ -176,6 +173,23 @@
         </form>
       </div>
-      <!-- end search options-->
-    </div>
+
+      <div class="options" tal:condition="availableLayers">
+        <h4>Metadata</h4>
+        <form tal:attributes="action viewerUrl" class="autosubmit">
+          <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})"
+            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
+          <ul>
+            <!-- text layer select buttons (rendered always) -->
+            <tal:block tal:repeat="layer availableLayers">
+              <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li"
+                tal:condition="python:exists(mpath)">
+                <li metal:use-macro="python:path(mpath)" />
+              </tal:block>
+            </tal:block>
+          </ul>
+          <input type="submit" value="Go!" />
+        </form>
+      </div>
+    </div> <!-- /option block column -->     
   </div>
   <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
Index: zpt/viewer_text.zpt
===================================================================
--- zpt/viewer_text.zpt	(revision 545)
+++ zpt/viewer_text.zpt	(revision 559)
@@ -75,8 +75,8 @@
       <div class="col buttons">
         <!--"BEGIN TEXT DISPLAY"  -->
-        <div class="options">
+        <div class="options" tal:condition="availableLayers">
           <h4>Text layer</h4>
           <form tal:attributes="action viewerUrl" class="autosubmit">
-            <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})"
+            <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})"
               tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
             <ul>
