File:  [Repository] / cdli / zpt / CDLIFileFolderMain.zpt
Revision 1.5: download - view: text, annotated - select for diffs - revision graph
Tue Feb 28 15:17:52 2006 UTC (18 years, 4 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
changes in baskets

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

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