File:  [Repository] / cdli / zpt / CDLIFileFolderMain.zpt
Revision 1.9.2.2: download - view: text, annotated - select for diffs - revision graph
Fri Jan 4 17:27:39 2008 UTC (16 years, 5 months ago) by casties
Branches: zcat_only_1
Diff to: branchpoint 1.9: preferred, unified
small changes

    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: 
   15: </tal:x>
   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>
   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>
   27:   <hr class="yellow">
   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>
   37:   <hr class="yellow">
   38:   <br><br>
   39:   </tal:block>
   40: 
   41:  <form>
   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>
   72:   <input class="button" type="submit" id="selectButton" value="Select All" onClick="toggleSelect(); return false">
   73:   <br><br>
   74: </form>
   75:   <tal:block tal:define="sortField python:here.REQUEST.get('sortField','title');
   76:   					    versions python:here.getVersionedFiles(sortField=sortField)">
   77:   					   
   78:   <form id="addBasket" tal:condition="python:len(versions)>0"  action="basketContainer/storeInBasket">
   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">
   81:   <input type="hidden" name="fromFileBrowser" value="1">
   82:   <input type="hidden" name="ids" value=" "><!-- make sure that ids is existing -->
   83:   
   84:   <table class="filelist"  width="100%" border=0 cellspacing=1 cellpadding=2>
   85:     <tr>
   86:       <th align=left>
   87:       <a href="?sortField=title"> File</a>
   88:       </th>
   89:         <th align=left>
   90:       Designation
   91:       </th>
   92:       <th align=left>
   93: 	Revisions
   94:       </th>
   95:       <th align=left>
   96: 	<a href="?sortField=date">Date</a>
   97:       </th>
   98:       <th align=left>
   99: 	<a href="?sortField=author">Author</a>
  100:       </th>
  101:       <th align=left>
  102: 	Last log entry
  103:       </th>
  104:       <th align=left width="80">
  105: 	<a href="?sortField=comment">Comment</a>
  106:       </th>
  107:       <th align=left>
  108: 	Download<br><a tal:attributes="href python:here.absolute_url()+'/helpDownload'" target="help">(help)</a>
  109:       </th>
  110:       <th align=left>
  111: 	Downl. and lock
  112:       </th>
  113:       <th align=left>
  114: 	Upload
  115:       </th>
  116:       <th>
  117:        &nbsp;
  118:        </th>
  119:     </tr>
  120:     <span tal:omit-tag="" tal:define="sortField python:here.REQUEST.get('sortField','title')" tal:repeat="version versions">
  121:       <tr tal:define="lastVersion python:version[1].getContentObject()">
  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>
  123: 	<td>
  124: 		   <span tal:content="lastVersion/getDesignation|python:'ERROR'"/>
  125:     </td>
  126: 	<td>
  127: 	<span tal:replace="lastVersion/versionNumber"/>
  128: 	<nobr><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/history'">(history)</a></nobr>
  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: 	
  140: 	<td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/addCDLIFileObjectForm'">Upload New Version</a></td>
  141: 	<td tal:condition="not:python:lastVersion.lockedBy==''">
  142: 	  <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>
  143: 	</td>
  144: 	<td>
  145: 	 <a tal:repeat="collection python:version[1].isContainedInBaskets(context=here)" tal:content="collection/title"
  146: 	 tal:attributes="href python:collection.getLastVersion().absolute_url()"/>	
  147:      </td>
  148:         </tr>
  149:     </span>
  150:    </table>
  151:    </form>
  152:    </tal:block>
  153:    </tal:block>
  154: </html>

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