Mercurial > hg > documentViewer
diff zpt/viewer_index.zpt @ 499:3f9703746fef elementtree
more cleanup. new template for viewMode=index (not pretty so far).
author | casties |
---|---|
date | Mon, 13 Feb 2012 19:28:33 +0100 |
parents | |
children | 29c6d09a506c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/viewer_index.zpt Mon Feb 13 19:28:33 2012 +0100 @@ -0,0 +1,108 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; + tocMode pageinfo/tocMode; viewType pageinfo/viewType; viewerUrl docinfo/viewerUrl; + numPages docinfo/numPages | nothing;"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> +<link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> +</head> +<body tal:condition="numPages"> + <tal:block + tal:define="docpath docinfo/textURLPath; + query nothing;"> + <table width="98%"> + <tr> + <td valign="top"> + <a href="http://echo.mpiwg-berlin.mpg.de/content"> + <img border="0" src="images/logo.png" align="top" alt=""/> + </a> + </td> + <td valign="top" align="right"> + <!--<b><span>home</span> <span>contact</span> <span>help</span></b>--> + </td> + <td valign="top" align="right"> + <!--BEGIN search --> + <form 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"/> + </form> + <!-- END search--> + </td> + </tr> + </table> + <table border="0"> + <tr> + <td valign="top"> + <a tal:define="tp docinfo/titlePage | nothing" tal:attributes="href python:context.getLink('viewMode','auto')"> + <img tal:condition="tp" border="0" tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500"/> + <img tal:condition="not:tp" border="0" src="images/oldbook.png"/> + </a> + </td> + <td valign="top"> + <table border=0 id="bibinfo" tal:define="formattedData python:here.metadata.getFormattedMetaDataExtended(bibdata=docinfo.get('bib', None))"> + <!-- wenn es bibinfo in docinfo gibt --> + + <tal:x condition="python:formattedData"> + <div tal:replace="structure python:formattedData"/> + <!-- <div><a href="javascript:showExtendedMetadata(1)">extended</a></div> --> + <div tal:condition="exists:docinfo/attribution" tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=docinfo['attribution'])"/> + <div tal:condition="exists:docinfo/copyright" tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=docinfo['copyright'])"/> + </tal:x> + + <!-- kein template fuer die daten --> + <tal:x condition="python:formattedData==None"> + <tal:x condition="exists:docinfo/bib"> + <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> + <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'"/> + <td class="content" tal:content="bibinfo/bib"/> + </tr> + </tal:x> + + <!-- wenn es keine bibinfo gibt (archimedes-texte) --> + <tal:y condition="not:exists:docinfo/bib"> + <tr> + <td class="type">Author:</td> + <td class="content" tal:content="python:docinfo['creator']"/> + </tr> + <tr> + <td class="type">Title:</td> + <td class="content" tal:content="python:docinfo['title']"/> + </tr> + <tr> + <td class="type">Year:</td> + <td class="content" tal:content="python:docinfo['date']"/> + </tr> + </tal:y> + </tal:x> <!-- ende kein template fuer die daten --> + </table> + + <br/><br/><br/><br/><br/><br/> + <table border="0" width="100%"> + <tr> + <td> + <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">Access Book</a> + </td> + </tr> + + <tr tal:condition="docpath"> + <td class="openbutton1">Download: + <a tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s.html'%(docpath.replace('.xml','.html'))" target="_blank">html</a> + / + <a tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">xml</a> + </td> + </tr> + </table> + </td> + </tr> + </table> + +</tal:block> +</body> +<body tal:condition="not:numPages"> + <div class="errortext">Sorry, document doesn't exist.</div> +</body> +</html> \ No newline at end of file