File:  [Repository] / cdli / zpt / BasketVersionMain.zpt
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Mon Feb 13 20:35:35 2006 UTC (18 years, 4 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
more basket

    1: <html metal:use-macro="here/main_template/macros/page">
    2:  <tal:block metal:fill-slot="body" tal:define="results  here/getContent;
    3:                     start request/start|python:0;
    4:                     batch python:modules['ZTUtils'].Batch(results, 
    5:                                                           size=20, 
    6:                                                           start=start);
    7:                     previous python:batch.previous;
    8:                     next python:batch.next">
    9: 
   10:   
   11:   <h2>CDLI File Storage</h2>
   12:   <p>Basket: <span tal:replace="python:here.aq_parent.title"/> contains <span tal:replace="here/numberOfItems"/> items</p>
   13:   <p><a tal:attributes="href python:here.getId()+'/downloadObjectsAsOneFile'"> download basket (combined in one file)</a>
   14:  <p><a tal:attributes="href python:here.getId()+'/downloadObjectsAsOneFile?lock=yes'"> download basket and lock (combined in one file)</a>
   15:  
   16:   <p>
   17:     <a tal:condition="previous"
   18:        tal:attributes="href string:${request/URL0}?start:int=${previous/first}"
   19:        href="previous_url">previous <span tal:replace="previous/length">20</span> results</a>
   20:     <a tal:condition="next"
   21:        tal:attributes="href string:${request/URL0}?start:int=${next/first}"
   22:        href="next_url">next <span tal:replace="next/length">20</span> results</a>
   23:   </p>
   24:  <form action="basket/deleteObjects">
   25:  <table  width="100%" border=0 cellspacing=1 cellpadding=2>
   26:     <tr>
   27:       <th align=left bgcolor="#88ff88">
   28:       <a href="?sortField=title"> File</a>
   29:       </th>
   30:       <th align=left bgcolor="#00">
   31: 	<a>Rev.</a>
   32:       </th>
   33:       <th align=left bgcolor="#cccccc">
   34: 	<a href="?sortField=date">Date</a>
   35:       </th>
   36:       <th align=left bgcolor="#cccccc">
   37: 	<a href="?sortField=author">Author</a>
   38:       </th>
   39:       <th align=left bgcolor="#cccccc">
   40: 	<a >Last log entry</a>
   41:       </th>
   42:       <th align=left bgcolor="#cccccc" width="80">
   43: 	<a href="?sortField=comment">Comment</a>
   44:       </th>
   45:       <th align=left bgcolor="#cccccc">
   46: 	<a>Download<br><font size="-1"><a tal:attributes="href python:here.absolute_url()+'/helpDownload'" target="help">(help)</a></font></a>
   47:       </th>
   48:       <th align=left bgcolor="#cccccc">
   49: 	<a>Downl. and lock</a>
   50:       </th>
   51:       <th align=left bgcolor="#cccccc">
   52: 	<a>Upload</a>
   53:       </th>
   54:     </tr>
   55:        
   56:   <tal:x repeat="result batch">
   57:    <tal:x tal:define="version python:here.getFile(result);lastVersion python:here.getFileLastVersion(result)">
   58:     <tr tal:attributes="class python:test(here.isActual(result),'actual','old')">
   59: 	<td><input type="checkbox" tal:attributes="value version/getId" name="ids">
   60: 		   <a tal:content="python:version.getTitle()" tal:attributes="href python:here.getObjUrl(result)+
   61: 		   '/'+lastVersion.getId()+'/view'"/></td>
   62: 	<td>
   63: 	<span tal:replace="lastVersion/getVersionNumber"/>
   64: 	<font size="-1"><a tal:attributes="href python:here.getObjUrl(result)+'/history'">(history)</a></font>
   65: 	</td>
   66: 	<td tal:content="lastVersion/getTime"/>
   67: 	<td tal:content="lastVersion/lastEditor"/>
   68: 	<td tal:content="lastVersion/getVersionComment"/>
   69:         <td><a tal:attributes="href python:here.getObjUrl(result)+'/manageVCommentForm'"><small tal:content="python:lastVersion.getVComment()"/></a></td>
   70:         <!--<td><a tal:attributes="href python:version.absolute_url()+'/manageCommentForm'"><small tal:content="python:version.getComment()"/></a></td>-->
   71: 	<td><a tal:attributes="href python:here.getObjUrl(result)">download</a></td>
   72: 	
   73: 	<td tal:condition="python:version.lockedBy==''"><a tal:attributes="href python:here.getObjUrl(result)+'/downloadLocked'">download and lock</a></td>
   74: 	<td tal:condition="not:python:version.lockedBy==''"><a>locked</a></td>
   75: 	
   76: 	<td tal:condition="python:version.lockedBy==''"><a tal:attributes="href python:here.getObjUrl(result)+'/'+version.title+'/addCDLIFileObjectForm'">Upload New Version</a></td>
   77: 	<td tal:condition="not:python:version.lockedBy==''">
   78: 	  <b tal:attributes="href python:here.getObjUrl(result)+'/addCDLIFileObjectForm'">Locked by: <span tal:replace="version/lockedBy"/></b>&nbsp;
   79: 	  <a tal:attributes="href python:here.getObjUrl(result)+'/unlock'">unlock</a>
   80: 	</td>
   81:    </tr>
   82:     </tal:x>
   83:   </tal:x>
   84: 
   85:   </table>
   86:   <p>
   87:     <a tal:condition="previous"
   88:        tal:attributes="href string:${request/URL0}?start:int=${previous/first}"
   89:        href="previous_url">previous <span tal:replace="previous/length">20</span> results</a>
   90:     <a tal:condition="next"
   91:        tal:attributes="href string:${request/URL0}?start:int=${next/first}"
   92:        href="next_url">next <span tal:replace="next/length">20</span> results</a>
   93:   </p>
   94: <input type="submit" value="delete from basket">
   95: </tal:block>
   96: </html>

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