Changeset 506:67014399894d in documentViewer for zpt


Ignore:
Timestamp:
Feb 21, 2012, 6:16:28 PM (13 years ago)
Author:
casties
Branch:
elementtree
Message:

cleaned out all 4suite code and weird methods.
fixed GIS places.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zpt/viewer_text.zpt

    r503 r506  
    2727  <tal:block
    2828    tal:define="docpath docinfo/textURLPath;
    29                                pn pageinfo/pn;
    30                                flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl';
    31                                textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
     29                pn pageinfo/pn;
     30                flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl';
     31                textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
    3232    <!-- header -->
    3333    <div class="page-head">
     
    6969              tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})"
    7070              tal:repeat="param params"
    71               tal:attributes="name param; value python:params[param]" />
    72             <input class="autosubmit" type="radio" name="viewMode" value="text"
    73               tal:attributes="checked python:viewMode=='text'" /> Text<br />
    74             <span class="optionsText">
    75               &nbsp;&nbsp;<input type="checkbox" class="autosubmit" name="viewLayer"
    76               value="dict" tal:attributes="checked python:viewLayer=='dict'" /> Dictionary<br />
    77             </span>
    78             <span class="optionsText" tal:condition="python:docinfo.get('numPlaces',0)">
     71              tal:attributes="name param; value python:params[param]" /> <input
     72              class="autosubmit" type="radio" name="viewMode" value="text"
     73              tal:attributes="checked python:viewMode=='text'" /> Text<br /> <span
     74              class="optionsText"> &nbsp;&nbsp;<input type="checkbox"
     75              class="autosubmit" name="viewLayer" value="dict"
     76              tal:attributes="checked python:viewLayer=='dict'" /> Dictionary<br />
     77            </span> <span class="optionsText" tal:condition="python:docinfo.get('numPlaces',0)">
    7978              &nbsp;&nbsp;<input type="checkbox" class="autosubmit" name="viewLayer"
    8079              value="gis" tal:attributes="checked python:viewLayer=='gis'" /> Places<br />
    81             </span>
    82             <input type="radio" class="autosubmit" name="viewMode" value="xml"
    83               tal:attributes="checked python:viewMode=='xml'" /> XML<br />
    84             <input type="submit" value="Go!" />
     80            </span> <input type="radio" class="autosubmit" name="viewMode" value="xml"
     81              tal:attributes="checked python:viewMode=='xml'" /> XML<br /> <input
     82              type="submit" value="Go!" />
    8583          </form>
    8684        </div>
     
    129127        <!--"BEGIN PLACES"-->
    130128        <div class="options" tal:condition="python:viewLayer=='gis'">
    131           <tal:block
    132             tal:define="gisPlaces python:here.getGisPlaces(docinfo=docinfo, pageinfo=pageinfo); gisAllPlaces python:here.getAllGisPlaces(docinfo=docinfo, pageinfo=pageinfo);">
    133             <span><b>Places</b></span>
    134             <br />(Link to extern:)<br />
    135             <span>Page</span>
    136             <span style="float: right"> <a
    137               tal:attributes="href python:'http://chinagis.mpiwg-berlin.mpg.de/chinagis/REST/db/mpdl/%s?id=%s&format=%s'%(name,gisPlaces,'gis')"
    138               target="_blank"> <img src="images/arrow.png" alt="" />
    139             </a>
    140             </span>
    141             <br />
    142             <span>Book</span>
    143             <span style="float: right"> <a
    144               tal:attributes="href python:'http://chinagis.mpiwg-berlin.mpg.de/chinagis/REST/db/mpdl/%s?format=%s'%(name,'gis')"
    145               target="_blank"> <img src="images/arrow.png" alt="" />
    146             </a>
    147             </span>
    148             <br />
     129          <tal:block tal:define="
     130            name docinfo/documentName;
     131            places python:here.getPlacesOnPage(docinfo=docinfo, pn=pn);
     132            pidlist python:','.join([p['id'] for p in places]);">
     133            <h4>Places</h4>
     134            <ul>
     135            <li><a
     136              tal:attributes="href python:'http://mappit.mpiwg-berlin.mpg.de/db/RESTdb/db/mpdl/%s?id=%s&format=gis'%(name,pidlist)"
     137              target="_blank">on this page</a>
     138            </li>
     139            <li>
     140              <a
     141              tal:attributes="href python:'http://mappit.mpiwg-berlin.mpg.de/db/RESTdb/db/mpdl/%s?format=gis'%(name)"
     142              target="_blank">in whole document</a>
     143            </li>
     144            </ul>
    149145          </tal:block>
    150146        </div>
Note: See TracChangeset for help on using the changeset viewer.