Changeset 543:6cdc31e9ed8e in documentViewer for zpt


Ignore:
Timestamp:
Aug 22, 2012, 2:25:38 PM (12 years ago)
Author:
casties
Branch:
default
Message:

fixed problem with dict-mode in default view.
added configurable footer and logo in site_template.pt

Location:
zpt
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • zpt/common_template.zpt

    r536 r543  
    1212                bib docinfo/bib | nothing; bibType docinfo/bibType | nothing;
    1313                formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);">
    14     <div class="logo" tal:condition="exists:here/template/logo.png">
    15       <img tal:attributes="src here/template/logo.png/absolute_url" />
     14    <div class="logo" tal:condition="exists:here/template/site_template.pt/macros/logo">
     15      <metal:block metal:use-macro="here/template/site_template.pt/macros/logo"/>
    1616    </div>
    1717    <div class="title-block">
  • zpt/layer_text_gis.zpt

    r526 r543  
    3131            pidlist python:','.join([p['id'] for p in places]);">
    3232        <h4>Places</h4>
    33         <ul>
     33        Show all places
     34        <ul class="list">
    3435          <li>
    3536            <a
  • zpt/viewer_images.zpt

    r540 r543  
    111111      <div class="errortext">Sorry, access to this document is restricted.</div>
    112112    </div>
     113    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     114      <!-- footer -->
     115      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     116    </tal:block>
     117   
    113118  </tal:block>
    114119</body>
    115120<body tal:condition="not:numPages">
    116121  <div class="errortext">Sorry, document doesn't exist.</div>
     122  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     123    <!-- footer -->
     124    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     125  </tal:block>
    117126</body>
    118127</html>
  • zpt/viewer_index.zpt

    r542 r543  
    128128      </div>
    129129
    130       <div class="options">
     130      <div class="options" tal:condition="docpath">
    131131        <h4>Search</h4>
    132132        <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl">
    133           <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':None})"
    134             tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> <input type="hidden"
    135             name="viewLayer" value="search" />
     133          <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})"
     134            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
    136135          <!-- query text -->
    137136          <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a
     
    150149      </div>
    151150      <!-- end search options-->
    152       <!--BEGIN search
    153           <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action python:here.getLink()">
    154             <input type="hidden" tal:define="params python:here.getParams('viewMode', None)" tal:repeat="param params"
    155               tal:attributes="name param; value python:params[param]" /> <input type="hidden" name="viewLayer" value="search" />
    156             <input type="text" name="query" tal:attributes="value query" /> <input type="submit" value="Search full document" /> <a
    157               tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a><br /> <input type="radio"
    158               name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> Exact <input type="radio"
    159               name="queryType" value="fulltextMorph" tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms <input
    160               type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> Fulltext index
    161             <input type="radio" name="queryType" value="ftIndexMorph" tal:attributes="checked python:queryType=='ftIndexMorph'" />
    162             Morphological index
    163           </form>
    164           END search-->
    165151    </div>
    166152  </div>
     153  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     154    <!-- footer -->
     155    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     156  </tal:block>
     157 
    167158</body>
    168159<body tal:condition="not:numPages">
    169160  <div class="errortext">Sorry, document doesn't exist.</div>
     161  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     162    <!-- footer -->
     163    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     164  </tal:block>
    170165</body>
    171166</html>
  • zpt/viewer_text.zpt

    r540 r543  
    1515<script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script>
    1616<script type="text/javascript">
    17         // <!--
     17// <!--
    1818        $(document).ready(function() {
    1919                // autosubmit forms
     
    3838                pn pageinfo/pn;
    3939                flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';
    40                 textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
     40                textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo);">
    4141    <!-- header -->
    4242    <div class="page-head">
     
    5555          <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
    5656        </div>
    57         <div class="content text">
     57        <div class="content text" tal:condition="textPage">
    5858          <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle"
    5959            tal:content="structure pageinfo/pageHeaderTitle" />
    60           <tal:block tal:replace="structure textPage" />
     60          <tal:block tal:condition="textPage" tal:replace="structure textPage"/>
     61          <div class="emptyPage" tal:condition="not:textPage">[Empty page]</div>
    6162        </div>
    6263      </div>
     
    140141      <div class="errortext">Sorry, access to this document is restricted.</div>
    141142    </div>
    142 
     143   
     144    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     145      <!-- footer -->
     146      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     147    </tal:block>
    143148  </tal:block>
    144149</body>
    145150<body tal:condition="not:numPages">
    146151  <div class="errortext">Sorry, document doesn't exist.</div>
     152    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     153      <!-- footer -->
     154      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     155    </tal:block>
    147156</body>
    148157</html>
  • zpt/viewer_thumbs.zpt

    r540 r543  
    9696      <div class="errortext">Sorry, access to this document is restricted.</div>
    9797    </div>
     98    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     99      <!-- footer -->
     100      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     101    </tal:block>
    98102  </tal:block>
    99103</body>
    100104<body tal:condition="not:numPages">
    101105  <div class="errortext">Sorry, document doesn't exist.</div>
     106  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     107    <!-- footer -->
     108    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     109  </tal:block>
    102110</body>
    103111</html>
  • zpt/viewer_xml.zpt

    r540 r543  
    8383    </div>
    8484
     85    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     86      <!-- footer -->
     87      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     88    </tal:block>
    8589  </tal:block>
    8690</body>
    8791<body tal:condition="not:numPages">
    8892  <div class="errortext">Sorry, document doesn't exist.</div>
     93  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
     94    <!-- footer -->
     95    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
     96  </tal:block>
    8997</body>
    9098</html>
Note: See TracChangeset for help on using the changeset viewer.