changeset 542:dbaa7dce60a5

nicer index page.
author casties
date Tue, 21 Aug 2012 13:28:35 +0200
parents c4cc01b104d7
children 6cdc31e9ed8e
files css/docuviewer.css zpt/viewer_index.zpt
diffstat 2 files changed, 55 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/css/docuviewer.css	Mon Aug 20 20:13:56 2012 +0200
+++ b/css/docuviewer.css	Tue Aug 21 13:28:35 2012 +0200
@@ -233,6 +233,13 @@
     margin-top: 0;
     margin-bottom: 0.5em;
 }
+div.col.buttons ul.list {
+	list-style-type: inherit;
+	padding-left: inherit;
+}
+div.col.buttons ul.list li {
+	margin-left: 1em;
+}
 div.options.digilib li img {
 	vertical-align: middle;
 }
@@ -295,15 +302,6 @@
 div.index-info td.content {
 	max-width: 30em;
 }
-div.index-actions {
-	float: left;
-	border: 1px solid silver;
-    padding: 1em;
-	margin-top: 2em;
-}
-div.index-actions div.action {
-	margin-bottom: 1em;
-}
 
 /*
  * image page
--- a/zpt/viewer_index.zpt	Mon Aug 20 20:13:56 2012 +0200
+++ b/zpt/viewer_index.zpt	Tue Aug 21 13:28:35 2012 +0200
@@ -28,7 +28,7 @@
         tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a>
     </div>
 
-    <div class="col">
+    <div class="col main">
       <div class="index-info">
         <h2>Bibliographical information</h2>
         <table border="0"
@@ -75,7 +75,7 @@
             </tr>
             <tr>
               <td class="type">Permanent URL:</td>
-              <td class="content"><a tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri"
+              <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>
           </table>
@@ -99,29 +99,60 @@
             </tr>
             <tr>
               <td class="type">License:</td>
-              <td class="content"><a href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless otherwise stated)</td>
+              <td class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a>
+                (unless otherwise stated)</td>
             </tr>
           </table>
         </tal:block>
       </div>
+    </div>
+    <div class="col buttons">
+      <div class="options">
+        <h4>Browse</h4>
+        <ul class="list">
+        <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li>
+        </ul>
+      </div>
 
-      <div class="index-actions">
-        <div class="action">
-          <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">&#8594;Browse document</a>
-        </div>
-        <div class="action" tal:condition="docpath">
-          Download full document as <a
+      <div class="options" tal:condition="docpath">
+        <h4>Download</h4>
+        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'))"
-            target="_blank">&#8594;HTML</a> or <a
-            tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">&#8594;XML</a>
-          (copyright and license see above)
-        </div>
-        <div class="action">
-          <!--BEGIN search -->
+            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 XML</a></li>
+        </ul>
+        (copyright and license see below)
+      </div>
+
+      <div class="options">
+        <h4>Search</h4>
+        <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl">
+          <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':None})"
+            tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> <input type="hidden"
+            name="viewLayer" value="search" />
+          <!-- query text -->
+          <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a
+            tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a>
+          <ul>
+            <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" />
+              Exact</li>
+            <li><input type="radio" name="queryType" value="fulltextMorph"
+              tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li>
+            <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" />
+              Fulltext index</li>
+            <li><input type="radio" name="queryType" value="ftIndexMorph"
+              tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li>
+          </ul>
+        </form>
+      </div>
+      <!-- end search options-->
+      <!--BEGIN search
           <form tal:define="queryType string:fulltextMorph" 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 type="hidden" name="viewLayer" value="search" />
-            <!-- query text -->
             <input type="text" name="query" tal:attributes="value query" /> <input type="submit" value="Search full document" /> <a
               tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a><br /> <input type="radio"
               name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> Exact <input type="radio"
@@ -130,9 +161,7 @@
             <input type="radio" name="queryType" value="ftIndexMorph" tal:attributes="checked python:queryType=='ftIndexMorph'" />
             Morphological index
           </form>
-          <!-- END search-->
-        </div>
-      </div>
+          END search-->
     </div>
   </div>
 </body>