Mercurial > hg > documentViewer
diff zpt/viewer_index.zpt @ 540:4b43a57ad9b3
more nicer
author | casties |
---|---|
date | Thu, 16 Aug 2012 19:09:49 +0200 |
parents | 37d122560028 |
children | c4cc01b104d7 |
line wrap: on
line diff
--- a/zpt/viewer_index.zpt Wed Aug 15 16:59:45 2012 +0200 +++ b/zpt/viewer_index.zpt Thu Aug 16 19:09:49 2012 +0200 @@ -22,7 +22,7 @@ <div class="col index-image"> <!-- image --> - <a tal:define="tp docinfo/titlePage | nothing" + <a tal:define="tp docinfo/titlePage | string:1" tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a> @@ -67,33 +67,41 @@ </table> <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri"> - <h2>Permanent URL</h2> - <table> - <tr> - <td class="type">Document ID:</td> - <td class="content" tal:content="dri" /> - </tr> - <tr> - <td class="type">Permanent URL:</td> - <td class="content"><a tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" - tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> - </tr> - </table> + <h2>Permanent URL</h2> + <table> + <tr> + <td class="type">Document ID:</td> + <td class="content" tal:content="dri" /> + </tr> + <tr> + <td class="type">Permanent URL:</td> + <td class="content"><a tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" + tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> + </tr> + </table> </tal:block> <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> - <h2>Copyright information</h2> - <table border="0" tal:condition="attribution | copyright"> - <!-- attribution --> - <tr tal:condition="attribution" - tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> - <!-- copyright --> - <tr tal:condition="copyright" - tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> - </table> - <table border="0" tal:condition="not:attribution | copyright"> - <tr><td></td></tr> - </table> + <h2>Copyright information</h2> + <table border="0" tal:condition="attribution | copyright"> + <!-- attribution --> + <tr tal:condition="attribution" + tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> + <!-- copyright --> + <tr tal:condition="copyright" + tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> + </table> + <table border="0" tal:condition="not:attribution | copyright"> + <tr> + <td class="type">Copyright:</td> + <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the + History of Science</a> (unless otherwise stated)</td> + </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></td> + </tr> + </table> </tal:block> </div> @@ -106,14 +114,21 @@ tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))" target="_blank">→HTML</a> or <a tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">→XML</a> + (copyright and license see above) </div> <div class="action"> <!--BEGIN search --> - <form tal:condition="docpath" tal:attributes="action python:here.getLink()"> + <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 class="textMain" name="query" - onfocus="this.select();" type="text" tal:attributes="value query" /> <input type="submit" class="buttonMain" - value="Search in Book" /> + 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" + name="queryType" value="fulltextMorph" tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms <input + type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> Fulltext index + <input type="radio" name="queryType" value="ftIndexMorph" tal:attributes="checked python:queryType=='ftIndexMorph'" /> + Morphological index </form> <!-- END search--> </div>