Annotation of cdli/zpt/CDLIFileFolderMain.zpt, revision 1.10
1.1 dwinter 1: <html metal:use-macro="here/main_template/macros/page">
1.4 dwinter 2: <tal:block metal:fill-slot="body" tal:define="options here/REQUEST">
1.1 dwinter 3: <h2>CDLI File Storage - <span tal:content="here/title"/></h2>
1.4 dwinter 4:
5: <tal:x tal:condition="python:options.get('basketName',None)">
6: <table width="100%">
7: <tr class="old">
8: <td>
9: <span tal:replace="python:options['numberOfObjects']"/> Objects stored in
10: <span tal:replace="python:options['basketName']"/>.
11: </td>
12: </tr>
13: </table>
1.6 dwinter 14:
1.4 dwinter 15: </tal:x>
1.6 dwinter 16: <tal:x condition="python:here.REQUEST.get('uploaded',None)">
17: <table width="100%" bgcolor="%FF0000">
18: <tr class="old">
19: <td>New version of <span tal:replace="python:here.REQUEST.get('uploaded',None)"/> added</td>
20: </tr>
21: </table>
22: </tal:x>
1.1 dwinter 23: <span tal:replace="structure here/header_html"/>
24: <a tal:condition="here/hasParent"
25: tal:attributes="href python:here.aq_parent.absolute_url()"
26: tal:content="python:'back (%s)'%here.aq_parent.title">back</a>
1.9 dwinter 27: <hr class="yellow">
1.1 dwinter 28: <tal:block tal:define="folders python:here.getFolders()" tal:condition="python:len(folders)>0">
29: <h3>Subfolder</h3>
30: <table>
31: <tr tal:repeat="folder folders">
32: <td><a tal:content="python:folder[0].title" tal:attributes="href python:folder[0].absolute_url()"/></td>
33: <td tal:content="python:'( folder: %s)'% folder[1]"/>
34: <td tal:content="python:'( files: %s)'% folder[2]"/>
35: </tr>
36: </table>
1.9 dwinter 37: <hr class="yellow">
38: <br><br>
1.1 dwinter 39: </tal:block>
1.6 dwinter 40:
41: <form>
1.1 dwinter 42: <script type="text/javascript">
43: <!--
44: isSelected=false
45:
46: function toggleSelect() {
47: addBasket=document.getElementById('addBasket')
48: selectButton=document.getElementById('selectButton')
49:
50: if (isSelected == false) {
51:
52: for (i = 0; i < addBasket.length-1; i++)
53:
54: addBasket.elements[i].checked = true ;
55:
56: isSelected = true;
57:
58: selectButton.value = "Deselect All";
59: return isSelected;
60: }
61: else {
62:
63: for (i = 0; i < addBasket.length+1; i++)
64: addBasket.elements[i].checked = false ;
65: isSelected = false;
66: selectButton.value = "Select All";
67: return isSelected;
68: }
69: }
70: //-->
71: </script>
1.9 dwinter 72: <input class="button" type="submit" id="selectButton" value="Select All" onClick="toggleSelect(); return false">
73: <br><br>
1.1 dwinter 74: </form>
75: <tal:block tal:define="sortField python:here.REQUEST.get('sortField','title');
76: versions python:here.getVersionedFiles(sortField=sortField)">
77:
1.2 dwinter 78: <form id="addBasket" tal:condition="python:len(versions)>0" action="basketContainer/storeInBasket">
1.9 dwinter 79: <input name="submit" class="button" type="submit" value="store in active basket">
80: <input name="submit" class="button" type="submit" value="store in new basket"> <input name="newBasketName">
1.4 dwinter 81: <input type="hidden" name="fromFileBrowser" value="1">
82: <input type="hidden" name="ids" value=" "><!-- make sure that ids is existing -->
83:
1.9 dwinter 84: <table class="filelist" width="100%" border=0 cellspacing=1 cellpadding=2>
1.1 dwinter 85: <tr>
1.9 dwinter 86: <th align=left>
1.1 dwinter 87: <a href="?sortField=title"> File</a>
88: </th>
1.9 dwinter 89: <th align=left>
90: Designation
1.6 dwinter 91: </th>
1.9 dwinter 92: <th align=left>
93: Revisions
1.1 dwinter 94: </th>
1.9 dwinter 95: <th align=left>
1.1 dwinter 96: <a href="?sortField=date">Date</a>
97: </th>
1.9 dwinter 98: <th align=left>
1.1 dwinter 99: <a href="?sortField=author">Author</a>
100: </th>
1.9 dwinter 101: <th align=left>
102: Last log entry
1.1 dwinter 103: </th>
1.9 dwinter 104: <th align=left width="80">
1.1 dwinter 105: <a href="?sortField=comment">Comment</a>
106: </th>
1.9 dwinter 107: <th align=left>
108: Download<br><a tal:attributes="href python:here.absolute_url()+'/helpDownload'" target="help">(help)</a>
1.1 dwinter 109: </th>
1.9 dwinter 110: <th align=left>
111: Downl. and lock
1.1 dwinter 112: </th>
1.9 dwinter 113: <th align=left>
114: Upload
1.1 dwinter 115: </th>
1.5 dwinter 116: <th>
117:
118: </th>
1.1 dwinter 119: </tr>
120: <span tal:omit-tag="" tal:define="sortField python:here.REQUEST.get('sortField','title')" tal:repeat="version versions">
1.10 ! casties 121: <tr tal:define="lastVersion python:version[1].getContentObject()">
1.9 dwinter 122: <td><nobr><input type="checkbox" tal:attributes="value python:version[1].getId()" name="ids"> <a tal:content="python:version[1].title" tal:attributes="href python:lastVersion.absolute_url()+'/view'"/></nobr></td>
1.1 dwinter 123: <td>
1.7 dwinter 124: <span tal:content="lastVersion/getDesignation|python:'ERROR'"/>
1.6 dwinter 125: </td>
126: <td>
1.1 dwinter 127: <span tal:replace="lastVersion/versionNumber"/>
1.9 dwinter 128: <nobr><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/history'">(history)</a></nobr>
1.1 dwinter 129: </td>
130: <td tal:content="lastVersion/getTime"/>
131: <td tal:content="lastVersion/lastEditor"/>
132: <td tal:content="lastVersion/versionComment"/>
133: <td><a tal:attributes="href python:lastVersion.absolute_url()+'/manageVCommentForm'"><small tal:content="python:lastVersion.getVComment()"/></a></td>
134: <!--<td><a tal:attributes="href python:version[1].absolute_url()+'/manageCommentForm'"><small tal:content="python:version[1].getComment()"/></a></td>-->
135: <td><a tal:attributes="href python:lastVersion.absolute_url()">download</a></td>
136:
137: <td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/downloadLocked'">download and lock</a></td>
138: <td tal:condition="not:python:lastVersion.lockedBy==''"><a>locked</a></td>
139:
1.3 dwinter 140: <td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/addCDLIFileObjectForm'">Upload New Version</a></td>
1.1 dwinter 141: <td tal:condition="not:python:lastVersion.lockedBy==''">
1.3 dwinter 142: <b tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/addCDLIFileObjectForm'">Locked by: <span tal:replace="lastVersion/lockedBy"/></b> <a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/unlock'">unlock</a>
1.1 dwinter 143: </td>
1.3 dwinter 144: <td>
1.5 dwinter 145: <a tal:repeat="collection python:version[1].isContainedInBaskets(context=here)" tal:content="collection/title"
1.10 ! casties 146: tal:attributes="href python:collection.getLastVersion().absolute_url()"/>
! 147: </td>
! 148: </tr>
1.1 dwinter 149: </span>
150: </table>
151: </form>
152: </tal:block>
153: </tal:block>
154: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>