Annotation of cdli/zpt/CDLIFileFolderMain.zpt, revision 1.1
1.1 ! dwinter 1: <html metal:use-macro="here/main_template/macros/page">
! 2: <tal:block metal:fill-slot="body">
! 3: <h2>CDLI File Storage - <span tal:content="here/title"/></h2>
! 4: <span tal:replace="structure here/header_html"/>
! 5: <a tal:condition="here/hasParent"
! 6: tal:attributes="href python:here.aq_parent.absolute_url()"
! 7: tal:content="python:'back (%s)'%here.aq_parent.title">back</a>
! 8: <hr>
! 9: <tal:block tal:define="folders python:here.getFolders()" tal:condition="python:len(folders)>0">
! 10: <h3>Subfolder</h3>
! 11: <table>
! 12: <tr tal:repeat="folder folders">
! 13: <td><a tal:content="python:folder[0].title" tal:attributes="href python:folder[0].absolute_url()"/></td>
! 14: <td tal:content="python:'( folder: %s)'% folder[1]"/>
! 15: <td tal:content="python:'( files: %s)'% folder[2]"/>
! 16: </tr>
! 17: </table>
! 18: <hr>
! 19: </tal:block>
! 20: <form>
! 21: <script type="text/javascript">
! 22: <!--
! 23:
! 24:
! 25: isSelected=false
! 26:
! 27: function toggleSelect() {
! 28: addBasket=document.getElementById('addBasket')
! 29: selectButton=document.getElementById('selectButton')
! 30:
! 31:
! 32: if (isSelected == false) {
! 33:
! 34: for (i = 0; i < addBasket.length-1; i++)
! 35:
! 36: addBasket.elements[i].checked = true ;
! 37:
! 38:
! 39: isSelected = true;
! 40:
! 41: selectButton.value = "Deselect All";
! 42: return isSelected;
! 43: }
! 44: else {
! 45:
! 46: for (i = 0; i < addBasket.length+1; i++)
! 47: addBasket.elements[i].checked = false ;
! 48: isSelected = false;
! 49: selectButton.value = "Select All";
! 50: return isSelected;
! 51: }
! 52: }
! 53:
! 54: //-->
! 55: </script>
! 56: <input class="space_right" type="submit" id="selectButton" value="Select All" onClick="toggleSelect(); return false">
! 57: </form>
! 58: <tal:block tal:define="sortField python:here.REQUEST.get('sortField','title');
! 59: versions python:here.getVersionedFiles(sortField=sortField)">
! 60:
! 61: <form id="addBasket" tal:condition="python:len(versions)>0" action="basket/storeInBasketForm">
! 62:
! 63: <table width="100%" border=0 cellspacing=1 cellpadding=2>
! 64: <tr>
! 65: <th align=left bgcolor="#88ff88">
! 66: <a href="?sortField=title"> File</a>
! 67: </th>
! 68: <th align=left bgcolor="#00">
! 69: <a>Rev.</a>
! 70: </th>
! 71: <th align=left bgcolor="#cccccc">
! 72: <a href="?sortField=date">Date</a>
! 73: </th>
! 74: <th align=left bgcolor="#cccccc">
! 75: <a href="?sortField=author">Author</a>
! 76: </th>
! 77: <th align=left bgcolor="#cccccc">
! 78: <a >Last log entry</a>
! 79: </th>
! 80: <th align=left bgcolor="#cccccc" width="80">
! 81: <a href="?sortField=comment">Comment</a>
! 82: </th>
! 83: <th align=left bgcolor="#cccccc">
! 84: <a>Download<br><font size="-1"><a tal:attributes="href python:here.absolute_url()+'/helpDownload'" target="help">(help)</a></font></a>
! 85: </th>
! 86: <th align=left bgcolor="#cccccc">
! 87: <a>Downl. and lock</a>
! 88: </th>
! 89: <th align=left bgcolor="#cccccc">
! 90: <a>Upload</a>
! 91: </th>
! 92: </tr>
! 93: <span tal:omit-tag="" tal:define="sortField python:here.REQUEST.get('sortField','title')" tal:repeat="version versions">
! 94: <tr tal:define="lastVersion python:version[1].getLastVersion()">
! 95: <td><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'"/></td>
! 96: <td>
! 97: <span tal:replace="lastVersion/versionNumber"/>
! 98: <font size="-1"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/history'">(history)</a></font>
! 99: </td>
! 100: <td tal:content="lastVersion/getTime"/>
! 101: <td tal:content="lastVersion/lastEditor"/>
! 102: <td tal:content="lastVersion/versionComment"/>
! 103: <td><a tal:attributes="href python:lastVersion.absolute_url()+'/manageVCommentForm'"><small tal:content="python:lastVersion.getVComment()"/></a></td>
! 104: <!--<td><a tal:attributes="href python:version[1].absolute_url()+'/manageCommentForm'"><small tal:content="python:version[1].getComment()"/></a></td>-->
! 105: <td><a tal:attributes="href python:lastVersion.absolute_url()">download</a></td>
! 106:
! 107: <td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/downloadLocked'">download and lock</a></td>
! 108: <td tal:condition="not:python:lastVersion.lockedBy==''"><a>locked</a></td>
! 109:
! 110: <td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/addVersionedFileObjectForm'">Upload New Version</a></td>
! 111: <td tal:condition="not:python:lastVersion.lockedBy==''">
! 112: <b tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/addVersionedFileObjectForm'">Locked by: <span tal:replace="lastVersion/lockedBy"/></b> <a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/unlock'">unlock</a>
! 113: </td>
! 114: </tr>
! 115: </span>
! 116: </table>
! 117: <input type="submit" value="store in basket">
! 118: </form>
! 119: </tal:block>
! 120: </tal:block>
! 121: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>