File:  [Repository] / cdli / zpt / viewCDLIFile.zpt
Revision 1.10: download - view: text, annotated - select for diffs - revision graph
Fri Aug 31 14:22:52 2007 UTC (16 years, 10 months ago) by casties
Branches: MAIN
CVS tags: zcat_only_1, Root_zcat_only_1, HEAD
fixed some problems with splitter

    1: <html metal:use-macro="here/main_template/macros/page">
    2:     <tal:block metal:fill-slot="body" define="query python:here.REQUEST.QUERY_STRING;
    3:                                               vars python:query.split('&');
    4:                                               allVars python:map(lambda x: x.split('='), vars);
    5:                                               allVarsF python:filter(lambda x: not x == [''], allVars);
    6:                                               dictVars python:dict(allVarsF);
    7:                                               p_no python:here.REQUEST.get('fileId',here.aq_parent.title.split('.')[0])">
    8:   
    9:         <h2>Textdisplay</h2>
   10:       
   11:         <p>
   12:           <a tal:attributes="href string:http://cdli.mpiwg-berlin.mpg.de/ID/$p_no" target="_blank">View database entry</a>
   13:         </p>
   14:     
   15:         <p tal:condition="not:python:dictVars.has_key('fromBasket')">
   16:              <a tal:content="python:'back(%s)'%here.aq_parent.aq_parent.title" tal:attributes="href python:here.aq_parent.aq_parent.absolute_url()"/>
   17: <!--            <a tal:content="string:back($p_no)" tal:attributes="href python:here.aq_parent.aq_parent.absolute_url()"/> -->
   18:         </p>
   19:         <tal:block condition="python:dictVars.has_key('fromBasket')">
   20:             <tal:block define="basket python:here.getBasketFromId(dictVars['fromBasket'],context=here.cdliRoot.basketContainer)">
   21:                 <p tal:condition="basket">
   22:                     <a tal:content="python:'back to basket ('+basket.title+')'" tal:attributes="href python:basket.getLastVersion().absolute_url()"/>
   23:                 </p>
   24:                 <p tal:condition="not:basket">
   25:                     <a tal:content="python:'back(%s)'%here.aq_parent.aq_parent.title" tal:attributes="href python:here.aq_parent.aq_parent.absolute_url()"/>
   26:                 </p>
   27:             </tal:block>
   28:         </tal:block>
   29:           
   30:         <p>File Name: <span tal:replace="here/title"/> (version <span tal:replace="here/versionNumber"/>)</p>
   31:         <p tal:condition="python:dictVars.has_key('fromBasket') and dictVars.has_key('filenr')">
   32:             <tal:block define="basket python:here.getBasketFromId(dictVars['fromBasket'],context=here.cdliRoot.basketContainer).getLastVersion();
   33:                        files python:basket.getLastVersion().getContent();
   34:                        index python:dictVars['filenr'];">
   35:                 <span tal:omit-tag="" tal:condition="python: int(index) > 0">
   36:                     <a tal:define="file python:files[int(index)-1]" tal:attributes="href python:basket.getObjUrl(file) + '/' + basket.getFileLastVersion(file).getId() + '/view?fromBasket='+dictVars['fromBasket']+'&filenr='+str(int(index)-1)">previous file</a>&nbsp;&nbsp;&nbsp;&nbsp;
   37:                 </span>
   38:                 <span tal:omit-tag="" tal:condition="python: int(index) < len(files)-1">
   39:                     <a tal:define="file python:files[int(index)+1]" tal:attributes="href python:basket.getObjUrl(file) + '/' + basket.getFileLastVersion(file).getId() + '/view?fromBasket='+dictVars['fromBasket']+'&filenr='+str(int(index)+1)">next file</a>
   40:                 </span>
   41:             
   42:             </tal:block>
   43:         </p>
   44:         <a tal:attributes="href python:here.absolute_url()">download</a>&nbsp;&nbsp;&nbsp;&nbsp;
   45:         <a tal:condition="python:here.lockedBy==''" tal:attributes="href python:here.REQUEST['URL1']+'/downloadLocked'">download and lock</a>
   46:         <a tal:condition="not:python:here.lockedBy==''">locked</a>&nbsp;&nbsp;&nbsp;&nbsp;
   47:         <a tal:condition="python:here.lockedBy==''" tal:attributes="href python:here.REQUEST['URL1']+'/'+'/addCDLIFileObjectForm'">Upload New Version</a>
   48:         <tal:block tal:condition="not:python:here.lockedBy==''">
   49:             <b tal:attributes="href python:here.REQUEST['URL1']+'/addCDLIFileObjectForm'">Locked by: <span tal:replace="here/lockedBy"/></b>&nbsp;&nbsp;&nbsp;&nbsp;<a tal:attributes="href python:here.REQUEST['URL2']+'/unlock'">unlock</a>
   50:         </tal:block>
   51:         <pre class="atf_file" tal:content="here/getFormattedData"/>
   52:     </tal:block>
   53:  </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>