Mercurial > hg > documentViewer
changeset 89:3d95ba1bf535
first version with new full-text infrastructure and slightly changed templates
author | casties |
---|---|
date | Fri, 19 Mar 2010 12:42:40 +0100 |
parents | 4938ce551ae8 |
children | 6a4a72033d58 |
files | zpt/page_main_text.zpt zpt/viewer_main.zpt |
diffstat | 2 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/page_main_text.zpt Fri Mar 19 12:42:40 2010 +0100 @@ -0,0 +1,3 @@ +<tal:block tal:define="mode python:options.get('viewMode','text'); pageinfo python:options.get('pageinfo',''); docinfo python:options.get('docinfo','')"> + <div tal:content="structure python:here.getTextPage(mode=mode,pn=pageinfo['current'],docinfo=docinfo)"></div> +</tal:block> \ No newline at end of file
--- a/zpt/viewer_main.zpt Fri Mar 19 12:42:40 2010 +0100 +++ b/zpt/viewer_main.zpt Fri Mar 19 12:42:40 2010 +0100 @@ -1,7 +1,10 @@ -<html tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode options/viewMode"> +<!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 options/viewMode"> <head> -<link rel="stylesheet" href="template/docuviewer_css" type="text/css"> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <link rel="stylesheet" href="template/docuviewer_css" type="text/css"> </head> <body tal:condition="docinfo/numPages"> <div tal:replace="structure python:here.template.head_main(docinfo=docinfo,viewMode=viewMode,pageinfo=pageinfo)"/> @@ -9,10 +12,11 @@ <table border="0" width="100%" height="100%"> <tr> <td width="300px" valign="top"> - <tal:block replace="structure python:here.template.thumbs_main(docinfo=docinfo,pageinfo=pageinfo)" /> + <tal:block tal:replace="structure python:here.template.thumbs_main(docinfo=docinfo,pageinfo=pageinfo)" /> </td> <td width="100%" valign="top"> - <tal:block tal:content="structure python:here.template.image_main(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode,mk=options['mk'])" /> + <tal:block tal:condition="python:viewMode=='images'" tal:content="structure python:here.template.page_main_images(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode,mk=options['mk'])" /> + <tal:block tal:condition="python:viewMode.startswith('text')" tal:content="structure python:here.template.page_main_text(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode,mk=options['mk'])" /> </td> </tr> </table>