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: parent here/aq_parent;
8: gparent parent/aq_parent;
9: p_no python:here.REQUEST.get('fileId',here.aq_parent.title.split('.')[0])">
10:
11: <p tal:condition="not:python:dictVars.has_key('fromBasket')">
12: <a tal:attributes="href gparent/absolute_url" tal:content="string:up to folder ${gparent/getId}"/>
13: </p>
14:
15: <h2>Textdisplay</h2>
16:
17: <p>
18: <a tal:attributes="href string:http://cdli.mpiwg-berlin.mpg.de/ID/$p_no" target="_blank">View database entry</a>
19: </p>
20: <p>
21: <a tal:attributes="href parent/absolute_url" >View file history</a>
22: </p>
23:
24: <tal:block condition="python:dictVars.has_key('fromBasket')">
25: <tal:block define="basket python:here.getBasketFromId(dictVars['fromBasket'],context=here.cdliRoot.basketContainer)">
26: <p tal:condition="basket">
27: <a tal:content="python:'back to basket ('+basket.title+')'" tal:attributes="href python:basket.getLastVersion().absolute_url()"/>
28: </p>
29: <p tal:condition="not:basket">
30: <a tal:content="python:'back(%s)'%here.aq_parent.aq_parent.title" tal:attributes="href python:here.aq_parent.aq_parent.absolute_url()"/>
31: </p>
32: </tal:block>
33: </tal:block>
34:
35: <p>File Name: <span tal:replace="here/getId"/> (version <span tal:replace="here/versionNumber"/>)</p>
36: <p tal:condition="python:dictVars.has_key('fromBasket') and dictVars.has_key('filenr')">
37: <tal:block define="basket python:here.getBasketFromId(dictVars['fromBasket'],context=here.cdliRoot.basketContainer).getLastVersion();
38: files python:basket.getLastVersion().getContent();
39: index python:dictVars['filenr'];">
40: <span tal:omit-tag="" tal:condition="python: int(index) > 0">
41: <a tal:define="file python:files[int(index)-1]" tal:attributes="href python:basket.getObjUrl(file[0]) + '/' + basket.getFileObjectLastVersion(file[0]).getId() + '/view?fromBasket='+dictVars['fromBasket']+'&filenr='+str(int(index)-1)">previous file</a>
42: </span>
43: <span tal:omit-tag="" tal:condition="python: int(index) < len(files)-1">
44: <a tal:define="file python:files[int(index)+1]" tal:attributes="href python:basket.getObjUrl(file[0]) + '/' + basket.getFileObjectLastVersion(file[0]).getId() + '/view?fromBasket='+dictVars['fromBasket']+'&filenr='+str(int(index)+1)">next file</a>
45: </span>
46:
47: </tal:block>
48: </p>
49: <a tal:attributes="href python:here.absolute_url()">download</a>
50: <a tal:condition="python:here.lockedBy==''" tal:attributes="href python:here.REQUEST['URL1']+'/downloadLocked'">download and lock</a>
51: <a tal:condition="not:python:here.lockedBy==''">locked</a>
52: <a tal:condition="python:here.lockedBy==''" tal:attributes="href python:here.REQUEST['URL1']+'/addCDLIFileObjectForm'">upload new version</a>
53: <a tal:condition="python:here.lockedBy==''" tal:attributes="href python:here.REQUEST['URL1']+'/editATF'">edit in browser</a>
54: <tal:block tal:condition="not:python:here.lockedBy==''">
55: <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>
56: </tal:block>
57: <pre class="atf_file" tal:content="here/getFormattedData"/>
58: </tal:block>
59: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>