Annotation of cdli/zpt/BasketVersionMain.zpt, revision 1.3

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

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