File:  [Repository] / cdli / zpt / basketObject_index_html.zpt
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Mon Nov 28 12:31:56 2005 UTC (18 years, 6 months ago) by dwinter
Branches: MAIN
CVS tags: HEAD
basked, locking upload

    1: <html metal:use-macro="here/main_template/macros/page">
    2:   <tal:block metal:fill-slot="body" tal:define="results  here/contents;
    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="here/getId"/> 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:    <tr tal:define="version result;lastVersion python:version.getLastVersion()">
   58: 	<td><input type="checkbox" tal:attributes="value version/getId" name="ids">
   59: 		   <a tal:content="python:version.title" tal:attributes="href python:lastVersion.absolute_url()+'/view'"/></td>
   60: 	<td>
   61: 	<span tal:replace="lastVersion/getVersionNumber"/>
   62: 	<font size="-1"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version.title+'/history'">(history)</a></font>
   63: 	</td>
   64: 	<td tal:content="lastVersion/getTime"/>
   65: 	<td tal:content="lastVersion/lastEditor"/>
   66: 	<td tal:content="lastVersion/getVersionComment"/>
   67:         <td><a tal:attributes="href python:lastVersion.absolute_url()+'/manageVCommentForm'"><small tal:content="python:lastVersion.getVComment()"/></a></td>
   68:         <!--<td><a tal:attributes="href python:version.absolute_url()+'/manageCommentForm'"><small tal:content="python:version.getComment()"/></a></td>-->
   69: 	<td><a tal:attributes="href python:lastVersion.absolute_url()">download</a></td>
   70: 	
   71: 	<td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version.title+'/downloadLocked'">download and lock</a></td>
   72: 	<td tal:condition="not:python:lastVersion.lockedBy==''"><a>locked</a></td>
   73: 	
   74: 	<td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version.title+'/addVersionedFileObjectForm'">Upload New Version</a></td>
   75: 	<td tal:condition="not:python:lastVersion.lockedBy==''">
   76: 	  <b tal:attributes="href python:here.REQUEST['URL1']+'/'+version.title+'/addVersionedFileObjectForm'">Locked by: <span tal:replace="lastVersion/lockedBy"/></b>&nbsp;<a tal:attributes="href python:here.REQUEST['URL1']+'/'+version.title+'/unlock'">unlock</a>
   77: 	</td>
   78:       </tr>
   79: 
   80:   </tal:x>
   81: 
   82:   </table>
   83:   <p>
   84:     <a tal:condition="previous"
   85:        tal:attributes="href string:${request/URL0}?start:int=${previous/first}"
   86:        href="previous_url">previous <span tal:replace="previous/length">20</span> results</a>
   87:     <a tal:condition="next"
   88:        tal:attributes="href string:${request/URL0}?start:int=${next/first}"
   89:        href="next_url">next <span tal:replace="next/length">20</span> results</a>
   90:   </p>
   91: <input type="submit" value="delete from basket">
   92: </tal:block>
   93: </html>

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