Ignore:
Timestamp:
6 May 2012, 08:28:32 (13 years ago)
Author:
Henrik Bettermann
Message:

We expect many uploaded files and have to improve file management.

  • Provide download view for uploaded csv files.
  • Let managers delete uploaded files.
  • Restrict upload to csv files.
  • Pending files must not be re-uploaded. They can either be edited in the files system (e.g. through ftp) or removed.

ToDo?:

  • Add browser tests
  • Add upload permission permission (People, who have the permission to manage files in the datacenter, are not automatically allowed to import data)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt

    r7811 r8366  
    99</p>
    1010
    11 <table i18n:domain="waeup.kofa">
    12   <thead>
    13     <tr>
    14       <th i18n:translate="">File</th>
    15       <th i18n:translate="">Size</th>
    16       <th i18n:translate="">Upload Date</th>
    17     </tr>
    18   </thead>
    19   <tbody>
    20     <tr tal:repeat="file context/getFiles">
    21       <td tal:content="file/name">FILENAME</td>
    22       <td tal:content="file/size">12 k</td>
    23       <td tal:content="file/uploaddate">Mar 12, 2008</td>
    24     </tr>
    25   </tbody>
    26 </table>
     11<form action="." tal:attributes="action request/URL" method="post"
     12      i18n:domain="waeup.kofa" enctype="multipart/form-data">
     13    <table i18n:domain="waeup.kofa" class="display dataTableManage">
     14      <thead>
     15        <tr>
     16          <th></th>
     17          <th i18n:translate="">File</th>
     18          <th i18n:translate="">Size</th>
     19          <th i18n:translate="">Upload Date</th>
     20        </tr>
     21      </thead>
     22      <tbody>
     23        <tr tal:repeat="file context/getFiles" class="gradeC">
     24          <td>
     25            <input type="checkbox" name="val_id"
     26                         tal:attributes="value file/name" />
     27          </td>
     28          <td><a tal:attributes="href python: 'download?filename=' + file.name"
     29                 tal:content="file/name">FILENAME</a></td>
     30          <td tal:content="file/size">12 k</td>
     31          <td tal:content="file/uploaddate">Mar 12, 2008</td>
     32        </tr>
     33      </tbody>
     34    </table>
     35      <div tal:condition="view/availableActions">
     36        <span tal:repeat="action view/actions" tal:omit-tag="">
     37          <input tal:replace="structure action/render"/>
     38        </span>
     39      </div>
     40</form>
Note: See TracChangeset for help on using the changeset viewer.