Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 8365)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 8366)
@@ -749,15 +749,47 @@
 #
 
-class DatacenterPage(KofaPage):
+class DatacenterPage(KofaEditFormPage):
     grok.context(IDataCenter)
     grok.name('index')
-    grok.require('waeup.manageUniversity')
+    grok.require('waeup.manageDataCenter')
     label = _(u'Data Center')
     pnav = 0
+
+    def update(self):
+        datatable.need()
+        warning.need()
+        return super(DatacenterPage, self).update()
+
+    @jsaction(_('Remove selected'))
+    def delFiles(self, **data):
+        form = self.request.form
+        logger = self.context.logger
+        if form.has_key('val_id'):
+            child_id = form['val_id']
+        else:
+            self.flash(_('No item selected.'))
+            return
+        if not isinstance(child_id, list):
+            child_id = [child_id]
+        deleted = []
+        for id in child_id:
+            fullpath = os.path.join(self.context.storage, id)
+            try:
+                os.remove(fullpath)
+                deleted.append(id)
+            except OSError:
+                self.flash(_('OSError: The file could not be deleted.'))
+                return
+        if len(deleted):
+            self.flash(_('Successfully deleted: ${a}',
+                mapping = {'a': ', '.join(deleted)}))
+            logger.info('%s: Deleted files %s' % (
+                self.request.principal.id, ', '.join(deleted)))
+        return
 
 class DatacenterUploadPage(KofaPage):
     grok.context(IDataCenter)
     grok.name('upload')
-    grok.require('waeup.manageUniversity')
+    grok.require('waeup.manageDataCenter')
     label = _(u'Upload file')
     pnav = 0
@@ -773,9 +805,15 @@
         try:
             filename = uploadfile.filename
+            if 'pending' in filename:
+                self.flash(_("You can't re-upload pending data files."))
+                return
+            if not filename.endswith('.csv'):
+                self.flash(_("Only csv files are allowed."))
+                return
             target = os.path.join(self.context.storage,
                                   self.getNormalizedFileName(filename))
             open(target, 'wb').write(uploadfile.read())
             logger = self.context.logger
-            logger.info('%s: Uploaded file "%s"' % (
+            logger.info('%s: Uploaded file %s' % (
                 self.request.principal.id, target))
         except IOError:
@@ -801,4 +839,22 @@
         return '%s_%s%s' % (base, filtered_username, ext.lower())
 
+class FileDownloadView(UtilityView, grok.View):
+    grok.context(IDataCenter)
+    grok.name('download')
+    grok.require('waeup.manageDataCenter')
+
+    def update(self, filename=None):
+        self.filename = self.request.form['filename']
+        return
+
+    def render(self):
+        self.response.setHeader(
+            'Content-Type', 'text/csv; charset=UTF-8')
+        self.response.setHeader(
+            'Content-Disposition:', 'attachment; filename="%s.csv' %
+            self.filename.replace('.csv',''))
+        fullpath = os.path.join(self.context.storage, self.filename)
+        return open(fullpath, 'rb').read()
+
 class DatacenterImportStep1(KofaPage):
     """Manual import step 1: choose file
@@ -807,5 +863,5 @@
     grok.name('import1')
     grok.template('datacenterimport1page')
-    grok.require('waeup.manageUniversity')
+    grok.require('waeup.manageDataCenter')
     label = _(u'Process CSV file')
     pnav = 0
@@ -837,5 +893,5 @@
     grok.name('import2')
     grok.template('datacenterimport2page')
-    grok.require('waeup.manageUniversity')
+    grok.require('waeup.manageDataCenter')
     label = _(u'Process CSV file')
     pnav = 0
@@ -957,5 +1013,5 @@
     grok.name('import3')
     grok.template('datacenterimport3page')
-    grok.require('waeup.manageUniversity')
+    grok.require('waeup.manageDataCenter')
     label = _(u'Process CSV file')
     pnav = 0
@@ -1065,5 +1121,5 @@
     grok.name('import4')
     grok.template('datacenterimport4page')
-    grok.require('waeup.manageUniversity')
+    grok.require('waeup.manageDataCenter')
     label = _(u'Process CSV file')
     pnav = 0
@@ -1183,5 +1239,5 @@
     grok.name('manage')
     grok.template('datacentermanagepage')
-    grok.require('waeup.manageUniversity')
+    grok.require('waeup.manageDataCenter')
     label = _('Edit data center settings')
     pnav = 0
Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt	(revision 8365)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt	(revision 8366)
@@ -9,18 +9,32 @@
 </p>
 
-<table i18n:domain="waeup.kofa">
-  <thead>
-    <tr>
-      <th i18n:translate="">File</th>
-      <th i18n:translate="">Size</th>
-      <th i18n:translate="">Upload Date</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr tal:repeat="file context/getFiles">
-      <td tal:content="file/name">FILENAME</td>
-      <td tal:content="file/size">12 k</td>
-      <td tal:content="file/uploaddate">Mar 12, 2008</td>
-    </tr>
-  </tbody>
-</table>
+<form action="." tal:attributes="action request/URL" method="post"
+      i18n:domain="waeup.kofa" enctype="multipart/form-data">
+    <table i18n:domain="waeup.kofa" class="display dataTableManage">
+      <thead>
+        <tr>
+          <th></th>
+          <th i18n:translate="">File</th>
+          <th i18n:translate="">Size</th>
+          <th i18n:translate="">Upload Date</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr tal:repeat="file context/getFiles" class="gradeC">
+          <td>
+            <input type="checkbox" name="val_id"
+                         tal:attributes="value file/name" />
+          </td>
+          <td><a tal:attributes="href python: 'download?filename=' + file.name"
+                 tal:content="file/name">FILENAME</a></td>
+          <td tal:content="file/size">12 k</td>
+          <td tal:content="file/uploaddate">Mar 12, 2008</td>
+        </tr>
+      </tbody>
+    </table>
+      <div tal:condition="view/availableActions">
+        <span tal:repeat="action view/actions" tal:omit-tag="">
+          <input tal:replace="structure action/render"/>
+        </span>
+      </div>
+</form>
