Changeset 542:dbaa7dce60a5 in documentViewer for zpt


Ignore:
Timestamp:
Aug 21, 2012, 11:28:35 AM (12 years ago)
Author:
casties
Branch:
default
Message:

nicer index page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zpt/viewer_index.zpt

    r541 r542  
    2929    </div>
    3030
    31     <div class="col">
     31    <div class="col main">
    3232      <div class="index-info">
    3333        <h2>Bibliographical information</h2>
     
    7676            <tr>
    7777              <td class="type">Permanent URL:</td>
    78               <td class="content"><a tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri"
     78              <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri"
    7979                tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td>
    8080            </tr>
     
    100100            <tr>
    101101              <td class="type">License:</td>
    102               <td class="content"><a href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless otherwise stated)</td>
     102              <td class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a>
     103                (unless otherwise stated)</td>
    103104            </tr>
    104105          </table>
    105106        </tal:block>
    106107      </div>
     108    </div>
     109    <div class="col buttons">
     110      <div class="options">
     111        <h4>Browse</h4>
     112        <ul class="list">
     113        <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li>
     114        </ul>
     115      </div>
    107116
    108       <div class="index-actions">
    109         <div class="action">
    110           <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">&#8594;Browse document</a>
    111         </div>
    112         <div class="action" tal:condition="docpath">
    113           Download full document as <a
     117      <div class="options" tal:condition="docpath">
     118        <h4>Download</h4>
     119        Download full document
     120        <ul class="list">
     121          <li><a target="_blank"
    114122            tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))"
    115             target="_blank">&#8594;HTML</a> or <a
    116             tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">&#8594;XML</a>
    117           (copyright and license see above)
    118         </div>
    119         <div class="action">
    120           <!--BEGIN search -->
     123            target="_blank">as HTML</a></li>
     124          <li><a target="_blank"
     125            tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">as XML</a></li>
     126        </ul>
     127        (copyright and license see below)
     128      </div>
     129
     130      <div class="options">
     131        <h4>Search</h4>
     132        <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl">
     133          <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':None})"
     134            tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> <input type="hidden"
     135            name="viewLayer" value="search" />
     136          <!-- query text -->
     137          <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a
     138            tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a>
     139          <ul>
     140            <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" />
     141              Exact</li>
     142            <li><input type="radio" name="queryType" value="fulltextMorph"
     143              tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li>
     144            <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" />
     145              Fulltext index</li>
     146            <li><input type="radio" name="queryType" value="ftIndexMorph"
     147              tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li>
     148          </ul>
     149        </form>
     150      </div>
     151      <!-- end search options-->
     152      <!--BEGIN search
    121153          <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action python:here.getLink()">
    122154            <input type="hidden" tal:define="params python:here.getParams('viewMode', None)" tal:repeat="param params"
    123155              tal:attributes="name param; value python:params[param]" /> <input type="hidden" name="viewLayer" value="search" />
    124             <!-- query text -->
    125156            <input type="text" name="query" tal:attributes="value query" /> <input type="submit" value="Search full document" /> <a
    126157              tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a><br /> <input type="radio"
     
    131162            Morphological index
    132163          </form>
    133           <!-- END search-->
    134         </div>
    135       </div>
     164          END search-->
    136165    </div>
    137166  </div>
Note: See TracChangeset for help on using the changeset viewer.