File:  [Repository] / ECHO_content / zpt / ECHO_linkCreator_main.zpt
Revision 1.5: download - view: text, annotated - select for diffs - revision graph
Tue Jan 9 17:01:01 2007 UTC (17 years, 4 months ago) by dwinter
Branches: MAIN
CVS tags: cleanup, Root_cleanup, HEAD
bug fixed in echo_xslt

<html>
<head>
<SCRIPT LANGUAGE="JavaScript"><!--
function openChild(file,window,button) {
    childWindow=open(file,window);
    if (childWindow.opener == null) childWindow.opener = self;
    };
//--></SCRIPT>
</head>
<body tal:define="col options/collection;global nr python:-1; masterUrl options/masterUrl; slaveUrl options/slaveUrl; entries python:here.getCollectionEntries(col)">
<h2>Collection: <span tal:replace="col"/></h2>
<form id="urls" tal:attributes="action python:here.absolute_url()+'/setUrls'">
<input type="hidden" name="collection" 
tal:attributes="value col">
<table>
<tr>
<td>
Masterurl
</td>
<td><input type="text" size="100" id="masterUrl" name="masterUrl" tal:attributes="value masterUrl">
</td>
</tr>
<tr>
<td>
Slaveurl
</td>
<td><input type="text" size="100" id="slaveUrl" name="slaveUrl" tal:attributes="value slaveUrl">
</td>
</tr>
</table>
<input type="submit" value="submit">
</form>
<form id="docs">
<table>
<tr>
<td>Master document</td>
<td><input size="50" id="master"></td>
</tr>
<tr>
<td>Slave document</td>
<td><input size="50" id="slave"></td>
</tr>
</table>
</form>
<button tal:attributes="onclick python:'openChild(document.getElementById(\'urls\').masterUrl.value+\'collection=%s&type=master&_pn=1&fn=\'+document.getElementById(\'docs\').master.value,\'masterWindow\',\'master\')'%col">show master</button>
<button tal:attributes="onclick python:'openChild(document.getElementById(\'urls\').slaveUrl.value+\'collection=%s&type=slave&_pn=1&fn=\'+document.getElementById(\'docs\').slave.value,\'slaveWindow\',\'slave\')'%col">show slave</button>


<tal:x tal:repeat="entry entries">
<form  tal:attributes="action python:here.absolute_url()+'/changeEntry'" tal:define="global nr python:nr+1">
<input type="hidden" name="nr:int" tal:attributes="value nr">
<input type="hidden" name="collection" 
tal:attributes="value col">
<table>
<tr tal:condition="python:entry.has_key('master')">
<td >Master:</td> 
<td tal:content="python:entry['master'][0]"/>
<td tal:content="python:entry['master'][1]"/>
<td><input site="20" name="masterID" tal:attributes="value python:entry['master'][2]"/></td>
<td><a target="master" tal:attributes="href python:masterUrl+'fn='+entry['master'][0]+'&_id='+entry['master'][1].split('(')[0]+'&_pagelink='+entry['master'][2]+'/'+str(entries.index(entry))+'/source&_links='+here.absolute_url()+'/'+col+'/getCollectionXML'">show
</a>
<a target="master" tal:attributes="href python:masterUrl+'_showall=yes&fn='+entry['master'][0]+'&_id='+entry['master'][1].split('(')[0]+'&_pagelink='+entry['master'][2]+'/'+str(entries.index(entry))+'/source&_links='+here.absolute_url()+'/'+col+'/getCollectionXML'">all on this page
</a>
</tr>
<tr tal:condition="python:entry.has_key('slave')">
<td>Slave:</td> 
<td><input type="text" size="90"  name="slaveUrl" tal:attributes="value python:entry['slave'][0]"/>
<td tal:content="python:entry['slave'][1]"/>
<td tal:content="python:entry['slave'][2]"/>
<td><a target="slave" tal:attributes="href python:slaveUrl+'fn='+entry['slave'][0]+'&_id='+entry['slave'][1].split('(')[0]+'&_pagelink='+entry['slave'][2]+'/'+str(entries.index(entry))+'/target&_links='+here.absolute_url()+'/'+col+'/getCollectionXML'">show
</a>
<input type="submit" value="change">
</tr>
</table>
</form>
<form  tal:attributes="action python:here.absolute_url()+'/removeEntry'">
<input type="hidden" name="nr:int" 
tal:attributes="value nr">
<input type="hidden" name="collection" 
tal:attributes="value col">
<input type="submit" value="delete">
</form>
<hr>
</tal:x>

</body>
</html>

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