Changeset 481:0a0f7f570f90 in documentViewer for zpt


Ignore:
Timestamp:
Aug 16, 2011, 10:02:00 AM (13 years ago)
Author:
casties
Branch:
elementtree
Message:

more new templates

Location:
zpt
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • zpt/toc_figures.zpt

    r122 r481  
    1 <tal:block tal:define="docinfo options/docinfo; pageinfo options/pageinfo; 
    2   pn python:int(pageinfo['tocPN']); tocsize python:int(docinfo['tocSize_figures']); grpsize python:int(pageinfo['tocPageSize']);
    3   maxpn python:int(tocsize/grpsize);">
    4   <div class="thumbruler">
    5     <span tal:condition="python:(pn>1)">
    6       <a tal:attributes="href python:here.getLink(param='tocPN',val=pn-1)">&lt;</a>
    7     </span>
    8     <span tal:content="string:$pn of $maxpn"/>
    9     <span>
    10     <a tal:attributes="href python:here.getLink(param='tocPN',val=pn+1)">&gt;</a>
    11   </span>
    12 </div>
    13   <div tal:content="structure python:here.getTocPage(mode='figures',pageinfo=pageinfo,docinfo=docinfo)"/>
    14 </tal:block>
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     2          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3<html xmlns="http://www.w3.org/1999/xhtml">
     4<head>
     5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     6</head>
     7<body>
     8  <!-- block used for main content area -->
     9  <div class="col_left" metal:define-macro="main"
     10    tal:define="pn pageinfo/tocPN; tocsize docinfo/tocSize_figures; grpsize pageinfo/tocPageSize;
     11                maxpn python:int(math.ceil(tocsize/float(grpsize)));">
     12    <ul class="switcher">
     13      <li><a
     14        tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a>
     15      </li>
     16      <li
     17        tal:condition="python:docpath and docinfo.get('numTocEntries', None)">
     18        <a tal:attributes="href python:here.getLink('tocMode','text')">Content</a>
     19      </li>
     20      <li
     21        tal:condition="python:docpath and docinfo.get('numFigureEntries', None)">
     22        <a
     23        tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a>
     24      </li>
     25      <li><a
     26        tal:attributes="href python:here.getLink('tocMode','none')">None</a>
     27      </li>
     28    </ul>
     29    <div class="ruler">
     30      <form class="autosubmit" tal:attributes="action viewerUrl">
     31        <input type="hidden"
     32          tal:define="params python:here.getParams('tocPN', None)"
     33          tal:repeat="param params"
     34          tal:attributes="name param; value python:params[param]" />
     35        <a tal:condition="python:(pn>1)"
     36          tal:attributes="href python:here.getLink('tocPN',pn-1)">&lt;</a>
     37        <span tal:condition="python:(pn<=1)">&lt;</span>
     38        <select class="autosubmit" name="tocPN">
     39          <option tal:repeat="idx python:range(maxpn)"
     40            tal:attributes="selected python:(pn==idx*grpsize+1); value python:(idx*grpsize+1)"
     41            tal:content="python:str(idx*grpsize+1)" />
     42        </select>
     43        <input type="submit" value="Go" />
     44        <a tal:condition="python:(pn<maxpn)"
     45          tal:attributes="href python:here.getLink('tocPN',pn+1)">&gt;</a>
     46        <span tal:condition="python:(pn>=maxpn)">&gt;</span>
     47      </form>
     48    </div>
     49    <div class="content"
     50      tal:content="structure python:here.getTocPage(mode='figures',pageinfo=pageinfo,docinfo=docinfo)" />
     51  </div>
     52  <!-- toc -->
     53</body>
     54</html>
  • zpt/toc_text.zpt

    r122 r481  
    1 <tal:block tal:define="docinfo options/docinfo; pageinfo options/pageinfo; 
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     2          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3<html xmlns="http://www.w3.org/1999/xhtml">
     4<head>
     5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     6</head>
     7<body>
     8  <!-- block used for main content area -->
     9  <div class="col_left" metal:define-macro="main"
     10     tal:define="docinfo options/docinfo; pageinfo options/pageinfo; 
    211  pn python:int(pageinfo['tocPN']); tocsize python:int(docinfo['tocSize_text']); grpsize python:int(pageinfo['tocPageSize']);
    312  maxpn python:int(tocsize/grpsize);">
     
    1120  </span>
    1221</div>
    13   <div tal:content="structure python:here.getTocPage(mode='text',pageinfo=pageinfo,docinfo=docinfo)"/>
    14 </tal:block>
     22  <div class="content" tal:content="structure python:here.getTocPage(mode='text',pageinfo=pageinfo,docinfo=docinfo)"/>
     23</div> <!-- toc -->
     24</body>
     25</html>
  • zpt/toc_thumbs.zpt

    r480 r481  
    77<body>
    88  <!-- block used for main content area -->
    9   <div class="toc" metal:define-macro="main"
     9  <div class="col_left" metal:define-macro="main"
    1010    tal:define="start pageinfo/start;
    1111                grpsize pageinfo/groupsize;
  • zpt/viewer_text.zpt

    r480 r481  
    2121  <div class="page_body" tal:condition="python:here.isAccessible(docinfo)">
    2222    <!--table of contents-->
    23     <div class="toc"
     23    <div class="col_left"
    2424      metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" />
    2525    <!-- text page -->
    26     <div class="text">
     26    <div class="col_main">
    2727      <div class="ruler">
    28         <form class="autosubmit pageruler" tal:attributes="action viewerUrl">
     28        <form class="autosubmit" tal:attributes="action viewerUrl">
    2929          <input type="hidden" tal:define="params python:here.getParams('pn', None)"
    3030            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
     
    4848        </form>
    4949      </div>
    50       <div class="page">
     50      <div class="content">
    5151        <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" tal:content="structure pageinfo/pageHeaderTitle"/>
    5252        <tal:block tal:replace="structure textPage"/>
Note: See TracChangeset for help on using the changeset viewer.