Annotation of cdli/zpt/viewCDLIFile.zpt, revision 1.6

1.1       dwinter     1: <html metal:use-macro="here/main_template/macros/page">
1.6     ! dwinter     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:   
        !             8:         <h2>Textdisplay</h2>
        !             9:       
        !            10:         <p>
        !            11:             <a tal:attributes="href python:'http://cdli.ucla.edu/'+here.aq_parent.aq_parent.title.split('.')[0]" target="_blank">View database entry</a>
        !            12:         </p>
        !            13:     
        !            14:         <p tal:condition="not:python:dictVars.has_key('fromBasket')">
        !            15:             <a tal:content="python:'back(%s)'%here.aq_parent.aq_parent.title" tal:attributes="href python:here.aq_parent.aq_parent.absolute_url()"/>
        !            16:         </p>
        !            17:         <tal:block condition="python:dictVars.has_key('fromBasket')">
        !            18:             <tal:block define="basket python:here.getBasketFromId(dictVars['fromBasket'],context=here.cdliRoot.basketContainer)">
        !            19:                 <p tal:condition="basket">
        !            20:                     <a tal:content="python:'back to basket ('+basket.title+')'" tal:attributes="href python:basket.getLastVersion().absolute_url()"/>
        !            21:                 </p>
        !            22:                 <p tal:condition="not:basket">
        !            23:                     <a tal:content="python:'back(%s)'%here.aq_parent.aq_parent.title" tal:attributes="href python:here.aq_parent.aq_parent.absolute_url()"/>
        !            24:                 </p>
        !            25:             </tal:block>
        !            26:         </tal:block>
        !            27:           
        !            28:         <p>File Name: <span tal:replace="here/title"/> (version <span tal:replace="here/versionNumber"/>)</p>
        !            29:         <p tal:condition="python:dictVars.has_key('fromBasket') and dictVars.has_key('filenr')">
        !            30:             <tal:block define="basket python:here.getBasketFromId(dictVars['fromBasket'],context=here.cdliRoot.basketContainer).getLastVersion();
        !            31:                        files python:basket.getLastVersion().getContent();
        !            32:                        index python:dictVars['filenr'];">
        !            33:                 <span tal:omit-tag="" tal:condition="python: int(index) > 0">
        !            34:                     <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;
        !            35:                 </span>
        !            36:                 <span tal:omit-tag="" tal:condition="python: int(index) < len(files)-1">
        !            37:                     <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>
        !            38:                 </span>
        !            39:             
        !            40:             </tal:block>
        !            41:         </p>
        !            42:         <a tal:attributes="href python:here.absolute_url()">download</a>&nbsp;&nbsp;&nbsp;&nbsp;
        !            43:         <a tal:condition="python:here.lockedBy==''" tal:attributes="href python:here.REQUEST['URL1']+'/downloadLocked'">download and lock</a>
        !            44:         <a tal:condition="not:python:here.lockedBy==''">locked</a>&nbsp;&nbsp;&nbsp;&nbsp;
        !            45:         <a tal:condition="python:here.lockedBy==''" tal:attributes="href python:here.REQUEST['URL1']+'/'+'/addCDLIFileObjectForm'">Upload New Version</a>
        !            46:         <tal:block tal:condition="not:python:here.lockedBy==''">
        !            47:             <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>
        !            48:         </tal:block>
        !            49:         <pre class="atf_file" tal:content="here/data"/>
        !            50:     </tal:block>
1.1       dwinter    51:  </html>

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