Annotation of cdli/zpt/viewCDLIFile.zpt, revision 1.10
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);
1.10 ! casties 6: dictVars python:dict(allVarsF);
! 7: p_no python:here.REQUEST.get('fileId',here.aq_parent.title.split('.')[0])">
1.6 dwinter 8:
9: <h2>Textdisplay</h2>
10:
11: <p>
1.10 ! casties 12: <a tal:attributes="href string:http://cdli.mpiwg-berlin.mpg.de/ID/$p_no" target="_blank">View database entry</a>
1.6 dwinter 13: </p>
14:
15: <p tal:condition="not:python:dictVars.has_key('fromBasket')">
1.10 ! casties 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()"/> -->
1.6 dwinter 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>
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>
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>
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> <a tal:attributes="href python:here.REQUEST['URL2']+'/unlock'">unlock</a>
50: </tal:block>
1.9 dwinter 51: <pre class="atf_file" tal:content="here/getFormattedData"/>
1.6 dwinter 52: </tal:block>
1.7 dwinter 53: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>