Mercurial > hg > documentViewer
changeset 537:ad6f97fd3944
fixes closing tickets concerning tocs.
author | casties |
---|---|
date | Fri, 27 Jul 2012 17:09:59 +0200 |
parents | abd36d4d97b8 |
children | dbf25bd05fc6 |
files | css/docuviewer.css zpt/layer_text_dict.zpt zpt/toc_concordance.zpt zpt/toc_figures.zpt zpt/toc_text.zpt zpt/toc_thumbs.zpt zpt/viewer_index.zpt |
diffstat | 7 files changed, 38 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/css/docuviewer.css Thu Jul 26 21:22:56 2012 +0200 +++ b/css/docuviewer.css Fri Jul 27 17:09:59 2012 +0200 @@ -117,10 +117,20 @@ div.tocbody { display: table-cell; border: 1px solid silver; + border-radius: 5px; padding: 0.5em; background-color: white; } +div.tocbody h4 { + margin-top: 0; + margin-bottom: 0.5em; +} +div.tocbody div.ruler { + text-align: center; + margin-bottom: 0.5em; +} + div.tocbody.text, div.tocbody.figures { max-width: 20em; @@ -153,6 +163,14 @@ color: black; } +div.tocbody table.concordance { + border-collapse: collapse; +} +div.tocbody table.concordance td { + border: 1px solid silver; + text-align: center; +} + /* * content */ @@ -205,12 +223,12 @@ } div.col.buttons h4 { margin-top: 0; - margin-bottom: 0; + margin-bottom: 0.5em; } div.col.buttons ul { list-style-type: none; padding-left: 0; - margin-top: 0.5em; + margin-top: 0; margin-bottom: 0.5em; } @@ -256,7 +274,7 @@ border: 1px solid silver; } div.col.main div.content-images table { - border-collapse:collapse; /* for tight digilib */ + border-collapse: collapse; /* for tight digilib */ } /*
--- a/zpt/layer_text_dict.zpt Thu Jul 26 21:22:56 2012 +0200 +++ b/zpt/layer_text_dict.zpt Fri Jul 27 17:09:59 2012 +0200 @@ -23,19 +23,20 @@ <metal:block metal:define-macro="options_box" tal:condition="python:'dict' in viewLayers"> <!--"BEGIN DICTIONARY OVERVIEW"--> - <div class="options"> + <!-- <div class="options"> <h4>Dictionary view</h4> <form name="f3" action=""> + <div>Open dictionary definition</div> <ul> <li> - <input type="radio" name="r3" /> Tab + <input type="radio" name="r3" /> in new Tab </li> <li> - <input type="radio" name="r3" /> Window + <input type="radio" name="r3" /> in new Window </li> </ul> </form> - </div> + </div> --> <!--"END DICTIONARY OVERVIEW"--> </metal:block>
--- a/zpt/toc_concordance.zpt Thu Jul 26 21:22:56 2012 +0200 +++ b/zpt/toc_concordance.zpt Fri Jul 27 17:09:59 2012 +0200 @@ -12,11 +12,12 @@ tal:define="start pageinfo/start; tocsize docinfo/numPages; grpsize pageinfo/tocPageSize; pageNumbers docinfo/pageNumbers | nothing; batch python:here.getBatch(start=start,size=grpsize,end=tocsize,data=pageNumbers);"> + <h4>Page concordance</h4> <div class="ruler"> <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> </div> <div class="content"> - <table tal:condition="pageNumbers"> + <table class="concordance" tal:condition="pageNumbers"> <tr> <th>Scan</th> <th>Original</th>
--- a/zpt/toc_figures.zpt Thu Jul 26 21:22:56 2012 +0200 +++ b/zpt/toc_figures.zpt Fri Jul 27 17:09:59 2012 +0200 @@ -11,6 +11,7 @@ <div class="tocbody figures" tal:define="start pageinfo/start; tocsize docinfo/numFigureEntries; grpsize pageinfo/tocPageSize; batch python:here.getBatch(start=start,size=grpsize,end=tocsize);"> + <h4>Table of figures</h4> <div class="ruler"> <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> </div>
--- a/zpt/toc_text.zpt Thu Jul 26 21:22:56 2012 +0200 +++ b/zpt/toc_text.zpt Fri Jul 27 17:09:59 2012 +0200 @@ -5,18 +5,19 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> - <div class="toc-container" metal:define-macro="main"> + <div class="toc-container" metal:define-macro="main" + tal:define="start pageinfo/start; tocsize docinfo/numTocEntries; grpsize pageinfo/tocPageSize; + batch python:here.getBatch(start=start,size=grpsize,end=tocsize);"> <div metal:use-macro="here/template/common_template/macros/toc_switcher" /> <!-- block used for main content area --> - <div class="tocbody text" - tal:define="start pageinfo/start; tocsize docinfo/numTocEntries; grpsize pageinfo/tocPageSize; - batch python:here.getBatch(start=start,size=grpsize,end=tocsize);"> + <div class="tocbody text"> + <h4>Table of contents</h4> <div class="ruler"> <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> </div> <div class="content" tal:content="structure python:here.getTocPage(mode='text',start=start,pageinfo=pageinfo,docinfo=docinfo)" /> </div> </div> - <!-- toc --> + <!-- toc --> </body> </html>
--- a/zpt/toc_thumbs.zpt Thu Jul 26 21:22:56 2012 +0200 +++ b/zpt/toc_thumbs.zpt Fri Jul 27 17:09:59 2012 +0200 @@ -18,10 +18,10 @@ right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);"> <div class="content"> + <h4>List of thumbnails</h4> <div class="ruler"> <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> </div> - <table class="thumbs"> <tr tal:repeat="row pageBatch/pages"> <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a
--- a/zpt/viewer_index.zpt Thu Jul 26 21:22:56 2012 +0200 +++ b/zpt/viewer_index.zpt Fri Jul 27 17:09:59 2012 +0200 @@ -76,10 +76,10 @@ <div class="index-actions"> <div class="action"> - <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">→Access Book</a> + <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">→Browse document</a> </div> <div class="action" tal:condition="docpath"> - Download as <a + Download full document 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> or <a tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">→XML</a>