Changeset 538:dbf25bd05fc6 in documentViewer for zpt
- Timestamp:
- Jul 30, 2012, 5:41:48 PM (12 years ago)
- Branch:
- default
- Location:
- zpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zpt/viewer_images.zpt
r536 r538 71 71 <!-- /col-main --> 72 72 <div class="col buttons"> 73 <div class="digilib-buttons"> 74 <div> 75 <a href="javascript:$digilib.digilib('zoomBy', 1.4)">zoom in</a> 76 </div> 77 <div> 78 <a href="javascript:$digilib.digilib('zoomBy', 0.7)">zoom out</a> 79 </div> 80 <div> 81 <a href="javascript:$digilib.digilib('zoomArea')">zoom area</a> 82 </div> 83 <div> 84 <a href="javascript:$digilib.digilib('zoomFull')">full page</a> 85 </div> 86 <div> 87 <a href="javascript:$digilib.digilib('zoomFull', 'width')">page width</a> 88 </div> 89 <div> 90 <a href="javascript:$digilib.digilib('setMark')">set mark</a> 91 </div> 92 <div> 93 <a href="javascript:$digilib.digilib('removeMark')">remove mark</a> 94 </div> 95 <div> 96 <a href="javascript:$digilib.digilib('reference')">get reference</a> 97 </div> 98 <div> 99 <a href="javascript:$digilib.digilib('digilibUrl', 'open_new')">digilib</a> 100 </div> 73 <div class="options digilib"> 74 <ul> 75 <li><a href="javascript:$digilib.digilib('zoomBy', 1.4)"> <img tal:condition="exists:here/template/zoom-in.png" 76 tal:attributes="src here/template/zoom-in.png/absolute_url" /> zoom in 77 </a></li> 78 <li><a href="javascript:$digilib.digilib('zoomBy', 0.7)"> <img 79 tal:condition="exists:here/template/zoom-out.png" tal:attributes="src here/template/zoom-out.png/absolute_url" /> 80 zoom out 81 </a></li> 82 <li><a href="javascript:$digilib.digilib('zoomArea')"> <img tal:condition="exists:here/template/zoom-area.png" 83 tal:attributes="src here/template/zoom-area.png/absolute_url" /> zoom area 84 </a></li> 85 <li><a href="javascript:$digilib.digilib('zoomFull')"> <img tal:condition="exists:here/template/zoom-full.png" 86 tal:attributes="src here/template/zoom-full.png/absolute_url" /> full page 87 </a></li> 88 <li><a href="javascript:$digilib.digilib('zoomFull', 'width')"> <img 89 tal:condition="exists:here/template/pagewidth.png" tal:attributes="src here/template/pagewidth.png/absolute_url" /> page 90 width 91 </a></li> 92 <li><a href="javascript:$digilib.digilib('setMark')"> <img tal:condition="exists:here/template/mark.png" 93 tal:attributes="src here/template/mark.png/absolute_url" /> set mark 94 </a></li> 95 <li><a href="javascript:$digilib.digilib('removeMark')"> <img tal:condition="exists:here/template/delmark.png" 96 tal:attributes="src here/template/delmark.png/absolute_url" /> remove mark 97 </a></li> 98 <li><a href="javascript:$digilib.digilib('reference')"> <img tal:condition="exists:here/template/reference.png" 99 tal:attributes="src here/template/reference.png/absolute_url" /> get reference 100 </a></li> 101 <li><a href="javascript:$digilib.digilib('digilibUrl', 'open_new')"> <img 102 tal:condition="exists:here/template/digilib.png" tal:attributes="src here/template/digilib.png/absolute_url" /> 103 digilib 104 </a></li> 105 </ul> 101 106 </div> 102 107 </div> -
zpt/viewer_index.zpt
r537 r538 17 17 <metal:block metal:use-macro="here/template/common_template/macros/head" /> 18 18 </div> 19 19 20 20 <!-- main --> 21 21 <div class="page-body"> 22 22 23 <div class="col index-image"> 24 <!-- image --> 25 <a tal:define="tp docinfo/titlePage | nothing" tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img 26 tal:condition="tp" border="0" tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img 27 tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a> 28 </div> 23 <div class="col index-image"> 24 <!-- image --> 25 <a tal:define="tp docinfo/titlePage | nothing" 26 tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" 27 tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img 28 tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a> 29 </div> 29 30 30 <div class="col">31 <div class="index-info">32 <table border="0"33 tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None))">34 <tal:x condition="python:formattedData">35 <!-- wenn es bibinfo in docinfo gibt -->36 <tr tal:replace="structure python:formattedData" />37 </tal:x>31 <div class="col"> 32 <div class="index-info"> 33 <table border="0" 34 tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None))"> 35 <tal:x condition="python:formattedData"> 36 <!-- wenn es bibinfo in docinfo gibt --> 37 <tr tal:replace="structure python:formattedData" /> 38 </tal:x> 38 39 39 <tal:x condition="not:formattedData">40 <!-- kein template fuer die daten -->41 <tal:x condition="exists:docinfo/bib">42 <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">43 <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />44 <td class="content" tal:content="bibinfo/bib" />45 </tr>46 </tal:x>40 <tal:x condition="not:formattedData"> 41 <!-- kein template fuer die daten --> 42 <tal:x condition="exists:docinfo/bib"> 43 <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> 44 <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" /> 45 <td class="content" tal:content="bibinfo/bib" /> 46 </tr> 47 </tal:x> 47 48 48 <tal:y condition="not:exists:docinfo/bib"> 49 <!-- wenn es kein bibinfo gibt (archimedes-texte) --> 49 <tal:y condition="not:exists:docinfo/bib"> 50 <!-- wenn es kein bibinfo gibt (archimedes-texte) --> 51 <tr> 52 <td class="type">Author:</td> 53 <td class="content" tal:content="docinfo/creator" /> 54 </tr> 55 <tr> 56 <td class="type">Title:</td> 57 <td class="content" tal:content="docinfo/title" /> 58 </tr> 59 <tr> 60 <td class="type">Date:</td> 61 <td class="content" tal:content="docinfo/date" /> 62 </tr> 63 </tal:y> 64 </tal:x> 65 <!-- ende kein template fuer die daten --> 66 </table> 67 68 <table tal:define="dri docinfo/DRI | nothing" tal:condition="dri"> 50 69 <tr> 51 <td class="type"> Author:</td>52 <td class="content" tal:content="d ocinfo/creator" />70 <td class="type">Document ID:</td> 71 <td class="content" tal:content="dri" /> 53 72 </tr> 54 73 <tr> 55 <td class="type">Title:</td> 56 <td class="content" tal:content="docinfo/title" /> 74 <td class="type">Permanent URL:</td> 75 <td class="content"><a tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" 76 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> 57 77 </tr> 58 <tr> 59 <td class="type">Date:</td> 60 <td class="content" tal:content="docinfo/date" /> 61 </tr> 62 </tal:y> 63 </tal:x> 64 <!-- ende kein template fuer die daten --> 65 </table> 78 </table> 66 79 67 <table border="0">68 <!-- attribution -->69 <tr tal:condition="exists:docinfo/attribution"70 tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=docinfo['attribution'])" />71 <!-- copyright -->72 <tr tal:condition="exists:docinfo/copyright"73 tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=docinfo['copyright'])" />74 </table>75 </div>80 <table border="0"> 81 <!-- attribution --> 82 <tr tal:condition="exists:docinfo/attribution" 83 tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=docinfo['attribution'])" /> 84 <!-- copyright --> 85 <tr tal:condition="exists:docinfo/copyright" 86 tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=docinfo['copyright'])" /> 87 </table> 88 </div> 76 89 77 <div class="index-actions"> 78 <div class="action"> 79 <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">→Browse document</a> 90 <div class="index-actions"> 91 <div class="action"> 92 <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">→Browse document</a> 93 </div> 94 <div class="action" tal:condition="docpath"> 95 Download full document as <a 96 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))" 97 target="_blank">→HTML</a> or <a 98 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">→XML</a> 99 </div> 100 <div class="action"> 101 <!--BEGIN search --> 102 <form tal:condition="docpath" tal:attributes="action python:here.getLink()"> 103 <input type="hidden" tal:define="params python:here.getParams('viewMode', None)" tal:repeat="param params" 104 tal:attributes="name param; value python:params[param]" /> <input class="textMain" name="query" 105 onfocus="this.select();" type="text" tal:attributes="value query" /> <input type="submit" class="buttonMain" 106 value="Search in Book" /> 107 </form> 108 <!-- END search--> 109 </div> 110 </div> 80 111 </div> 81 <div class="action" tal:condition="docpath">82 Download full document as <a83 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))"84 target="_blank">→HTML</a> or <a85 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">→XML</a>86 </div>87 <div class="action">88 <!--BEGIN search -->89 <form tal:condition="docpath" tal:attributes="action python:here.getLink()">90 <input type="hidden" tal:define="params python:here.getParams('viewMode', None)" tal:repeat="param params"91 tal:attributes="name param; value python:params[param]" /> <input class="textMain" name="query" onfocus="this.select();"92 type="text" tal:attributes="value query" /> <input type="submit" class="buttonMain" value="Search in Book" />93 </form>94 <!-- END search-->95 </div>96 </div>97 </div>98 112 </div> 99 113 </body>
Note: See TracChangeset
for help on using the changeset viewer.