Annotation of cdli/zpt/CDLIFileFolderMain.zpt, revision 1.9.2.1

1.1       dwinter     1: <html metal:use-macro="here/main_template/macros/page">
1.4       dwinter     2:   <tal:block metal:fill-slot="body" tal:define="options here/REQUEST">
1.1       dwinter     3:   <h2>CDLI File Storage - <span tal:content="here/title"/></h2>
1.4       dwinter     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>
1.6       dwinter    14: 
1.4       dwinter    15: </tal:x>
1.6       dwinter    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>
1.1       dwinter    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>
1.9       dwinter    27:   <hr class="yellow">
1.1       dwinter    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>
1.9       dwinter    37:   <hr class="yellow">
                     38:   <br><br>
1.1       dwinter    39:   </tal:block>
1.6       dwinter    40: 
                     41:  <form>
1.1       dwinter    42:   <script type="text/javascript">
                     43: <!-- 
                     44: 
                     45: 
                     46: isSelected=false
                     47: 
                     48: function toggleSelect() {
                     49: addBasket=document.getElementById('addBasket')
                     50: selectButton=document.getElementById('selectButton')
                     51: 
                     52:   
                     53:   if (isSelected == false) {
                     54: 
                     55:     for (i = 0; i < addBasket.length-1; i++)
                     56:    
                     57:       addBasket.elements[i].checked = true ;
                     58:       
                     59:     
                     60:       isSelected = true;
                     61: 
                     62:       selectButton.value = "Deselect All";
                     63:       return isSelected;
                     64:   }
                     65:   else {
                     66: 
                     67:     for (i = 0; i < addBasket.length+1; i++)
                     68:       addBasket.elements[i].checked = false ;
                     69:       isSelected = false;
                     70:       selectButton.value = "Select All";
                     71:       return isSelected;       
                     72:   }
                     73: }
                     74: 
                     75: //-->
                     76: </script>
1.9       dwinter    77:   <input class="button" type="submit" id="selectButton" value="Select All" onClick="toggleSelect(); return false">
                     78:   <br><br>
1.1       dwinter    79: </form>
                     80:   <tal:block tal:define="sortField python:here.REQUEST.get('sortField','title');
                     81:                        versions python:here.getVersionedFiles(sortField=sortField)">
                     82:                       
1.2       dwinter    83:   <form id="addBasket" tal:condition="python:len(versions)>0"  action="basketContainer/storeInBasket">
1.9       dwinter    84:   <input name="submit" class="button" type="submit" value="store in active basket">
                     85:   <input name="submit" class="button" type="submit" value="store in new basket"> <input name="newBasketName">
1.4       dwinter    86:   <input type="hidden" name="fromFileBrowser" value="1">
                     87:   <input type="hidden" name="ids" value=" "><!-- make sure that ids is existing -->
                     88:   
1.9       dwinter    89:   <table class="filelist"  width="100%" border=0 cellspacing=1 cellpadding=2>
1.1       dwinter    90:     <tr>
1.9       dwinter    91:       <th align=left>
1.1       dwinter    92:       <a href="?sortField=title"> File</a>
                     93:       </th>
1.9       dwinter    94:         <th align=left>
                     95:       Designation
1.6       dwinter    96:       </th>
1.9       dwinter    97:       <th align=left>
                     98:    Revisions
1.1       dwinter    99:       </th>
1.9       dwinter   100:       <th align=left>
1.1       dwinter   101:    <a href="?sortField=date">Date</a>
                    102:       </th>
1.9       dwinter   103:       <th align=left>
1.1       dwinter   104:    <a href="?sortField=author">Author</a>
                    105:       </th>
1.9       dwinter   106:       <th align=left>
                    107:    Last log entry
1.1       dwinter   108:       </th>
1.9       dwinter   109:       <th align=left width="80">
1.1       dwinter   110:    <a href="?sortField=comment">Comment</a>
                    111:       </th>
1.9       dwinter   112:       <th align=left>
                    113:    Download<br><a tal:attributes="href python:here.absolute_url()+'/helpDownload'" target="help">(help)</a>
1.1       dwinter   114:       </th>
1.9       dwinter   115:       <th align=left>
                    116:    Downl. and lock
1.1       dwinter   117:       </th>
1.9       dwinter   118:       <th align=left>
                    119:    Upload
1.1       dwinter   120:       </th>
1.5       dwinter   121:       <th>
                    122:        &nbsp;
                    123:        </th>
1.9       dwinter   124:         <th>
                    125:        &nbsp;
                    126:        </th>
1.1       dwinter   127:     </tr>
                    128:     <span tal:omit-tag="" tal:define="sortField python:here.REQUEST.get('sortField','title')" tal:repeat="version versions">
1.9.2.1 ! casties   129:       <tr tal:define="lastVersion python:version[1].getContentObject()">
1.9       dwinter   130:    <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>
1.1       dwinter   131:    <td>
1.7       dwinter   132:           <span tal:content="lastVersion/getDesignation|python:'ERROR'"/>
1.6       dwinter   133:     </td>
                    134:    <td>
1.1       dwinter   135:    <span tal:replace="lastVersion/versionNumber"/>
1.9       dwinter   136:    <nobr><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/history'">(history)</a></nobr>
1.1       dwinter   137:    </td>
                    138:    <td tal:content="lastVersion/getTime"/>
                    139:    <td tal:content="lastVersion/lastEditor"/>
                    140:    <td tal:content="lastVersion/versionComment"/>
                    141:         <td><a tal:attributes="href python:lastVersion.absolute_url()+'/manageVCommentForm'"><small tal:content="python:lastVersion.getVComment()"/></a></td>
                    142:         <!--<td><a tal:attributes="href python:version[1].absolute_url()+'/manageCommentForm'"><small tal:content="python:version[1].getComment()"/></a></td>-->
                    143:    <td><a tal:attributes="href python:lastVersion.absolute_url()">download</a></td>
                    144:    
                    145:    <td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/downloadLocked'">download and lock</a></td>
                    146:    <td tal:condition="not:python:lastVersion.lockedBy==''"><a>locked</a></td>
                    147:    
1.3       dwinter   148:    <td tal:condition="python:lastVersion.lockedBy==''"><a tal:attributes="href python:here.REQUEST['URL1']+'/'+version[0]+'/addCDLIFileObjectForm'">Upload New Version</a></td>
1.1       dwinter   149:    <td tal:condition="not:python:lastVersion.lockedBy==''">
1.3       dwinter   150:      <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>
1.1       dwinter   151:    </td>
1.3       dwinter   152:    <td>
1.5       dwinter   153:     <a tal:repeat="collection python:version[1].isContainedInBaskets(context=here)" tal:content="collection/title"
1.3       dwinter   154:     tal:attributes="href python:collection.getLastVersion().absolute_url()"/>  </td>
1.6       dwinter   155:   
                    156:       <td>
                    157:        <a tal:attributes="href python:here.absolute_url()+'/delete?ids='+version[0]">del</a>
                    158:       </td>
1.1       dwinter   159:       </tr>
                    160:     </span>
                    161:    </table>
                    162:    </form>
                    163:    </tal:block>
                    164:    </tal:block>
                    165: </html>

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