changeset 502:daf36d0fcfee elementtree

more cleanup.
author casties
date Thu, 16 Feb 2012 13:53:27 +0100
parents 29c6d09a506c
children 030251fe9dbc
files zpt/common_template.zpt zpt/viewer_index.zpt zpt/viewer_text.zpt
diffstat 3 files changed, 23 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/zpt/common_template.zpt	Wed Feb 15 17:57:02 2012 +0100
+++ b/zpt/common_template.zpt	Thu Feb 16 13:53:27 2012 +0100
@@ -15,6 +15,9 @@
     <div tal:condition="not:formattedLabel"
       tal:content="string:[no bibliographical information for this document (type ${bibType})]" />
     <div tal:condition="formattedLabel" tal:content="structure formattedLabel" />
+    <div class="doclinks">
+      <a tal:attributes="href python:here.getLink('viewMode','index')">Bibliographical information</a>
+    </div>
   </metal:block>
   <!-- /head -->
 
@@ -26,26 +29,19 @@
               left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev);
               leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);">
     <form class="autosubmit" tal:attributes="action viewerUrl">
-      <input type="hidden" tal:define="params python:here.getParams('pn', None)"
-        tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
-      page <a tal:condition="leftest"
-        tal:attributes="href python:here.getLink('pn',leftest)">|&lt;</a> <span
-        tal:condition="not:leftest">|&lt;</span> <a tal:condition="left"
-        tal:attributes="href python:here.getLink('pn',left)">&lt;</a> <span
-        tal:condition="not:left">&lt;</span> <input class="autosubmit" size="3"
-        type="text" name="pn" tal:attributes="value pn" /> <span class="originalPage"
-        title="Original page number"
-        tal:define="originalPage pageinfo/pageNumberOrig | nothing"
-        tal:condition="python:originalPage!=None"> (<span
-        tal:replace="originalPage" /><span
-        tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing"
-        tal:condition="python:originalPageNorm!=None"> [<span
+      <input type="hidden" tal:define="params python:here.getParams('pn', None)" tal:repeat="param params"
+        tal:attributes="name param; value python:params[param]" /> page <a tal:condition="leftest"
+        tal:attributes="href python:here.getLink('pn',leftest)">|&lt;</a> <span tal:condition="not:leftest">|&lt;</span> <a
+        tal:condition="left" tal:attributes="href python:here.getLink('pn',left)">&lt;</a> <span tal:condition="not:left">&lt;</span>
+      <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" /> <span class="originalPage"
+        title="Original page number" tal:define="originalPage pageinfo/pageNumberOrig | nothing"
+        tal:condition="python:originalPage!=None"> (<span tal:replace="originalPage" /><span
+        tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None"> [<span
           tal:replace="originalPageNorm" />]
       </span>)
-      </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a
-        tal:condition="right" tal:attributes="href python:here.getLink('pn',right)">&gt;</a>
-      <span tal:condition="not:right">&gt;</span> <a tal:condition="rightest"
-        tal:attributes="href python:here.getLink('pn',rightest)">&gt;|</a> <span
+      </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a tal:condition="right"
+        tal:attributes="href python:here.getLink('pn',right)">&gt;</a> <span tal:condition="not:right">&gt;</span> <a
+        tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">&gt;|</a> <span
         tal:condition="not:rightest">&gt;|</span>
     </form>
   </metal:block>
@@ -54,19 +50,14 @@
   <!-- toc ruler with previous/next toc page buttons -->
   <metal:block metal:define-macro="toc_ruler">
     <form class="autosubmit" tal:attributes="action viewerUrl">
-      <input type="hidden" tal:define="params python:here.getParams('start', None)"
-        tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
-      <a tal:condition="batch/prevStart"
-        tal:attributes="href python:here.getLink('start',batch['prevStart'])">&lt;</a> <span
-        tal:condition="not:batch/prevStart">&lt;</span>
+      <input type="hidden" tal:define="params python:here.getParams('start', None)" tal:repeat="param params"
+        tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart"
+        tal:attributes="href python:here.getLink('start',batch['prevStart'])">&lt;</a> <span tal:condition="not:batch/prevStart">&lt;</span>
       <select class="autosubmit" name="start">
-        <option tal:repeat="grp batch/batches"
-          tal:attributes="selected python:(start==grp['start']); value grp/start"
+        <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start==grp['start']); value grp/start"
           tal:content="string:${grp/start} - ${grp/end}" />
-      </select>
-      <input type="submit" value="Go" /> <a tal:condition="batch/nextStart"
-        tal:attributes="href python:here.getLink('start',batch['nextStart'])">&gt;</a> <span
-        tal:condition="not:batch/nextStart">&gt;</span>
+      </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart"
+        tal:attributes="href python:here.getLink('start',batch['nextStart'])">&gt;</a> <span tal:condition="not:batch/nextStart">&gt;</span>
     </form>
   </metal:block>
 
--- a/zpt/viewer_index.zpt	Wed Feb 15 17:57:02 2012 +0100
+++ b/zpt/viewer_index.zpt	Thu Feb 16 13:53:27 2012 +0100
@@ -31,7 +31,7 @@
         <tr tal:replace="structure python:formattedData" />
       </tal:x>
 
-      <tal:x condition="python:formattedData==None">
+      <tal:x condition="not:formattedData">
         <!-- kein template fuer die daten -->
         <tal:x condition="exists:docinfo/bib">
           <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
@@ -75,7 +75,7 @@
         tal:attributes="href python:context.getLink('viewMode','auto')">Access Book</a>
     </div>
     <div tal:condition="docpath">
-      Download: <a
+      Download as <a
         tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(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)"
--- a/zpt/viewer_text.zpt	Wed Feb 15 17:57:02 2012 +0100
+++ b/zpt/viewer_text.zpt	Thu Feb 16 13:53:27 2012 +0100
@@ -29,6 +29,7 @@
                                pn pageinfo/pn; 
                                flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl';
                                textPage python:here.getTextPage(mode=viewType, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
+    <!-- header -->
     <div class="page-head">
       <metal:block metal:use-macro="here/template/common_template/macros/head" />
     </div>