Index: WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt
===================================================================
--- WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt	(revision 3291)
+++ WAeUP_SRP/base/skins/waeup_upload/uploads_form.pt	(revision 3292)
@@ -1,4 +1,4 @@
 <metal:html tal:define="info options/info;
-            portal_status_message options/psm;
+            portal_status_message options/psm|request/portal_status_message;
             ds options/ds;
             mode options/mode;
@@ -23,82 +23,156 @@
                class="destructive" />
       </form>
-      <form action="" method="post" class="group"
-            tal:attributes="action info/action"
-            tal:define="rows python: info['items'];"
-            >
-        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
-          <tr>
-            <th></th>
-            <th>Filename</th>
-            <th>Data Layout</th>
-            <th>By</th>
-            <th>Date</th>
-            <th>Message</th>
-            <th>Unknown Fields</th>
-          </tr>            
-          <tr tal:repeat="row rows"
-            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
-            <td align="left" valign="middle" style="width: 5px;">
-              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
-                     tal:define="id string:${row/id}.csv"
-                     tal:attributes="value id;
-                     id python:'cb_' + id;
-                     checked python:id in info['choosen_ids'];" 
-                     />
-            </td>
-            <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a>  </td>
-            <td tal:content="string:${row/id}.csv" ></td>
-            <td>
-              <select name="import_layout:record" tal:attributes="name string:${row/id}.import_layout:record">
-                <option tal:repeat="option python: context.portal_vocabularies.import_names.items()"
-                        tal:attributes="value python: option[0];
-                        selected python: option[0] == row['import_layout']" 
-                        tal:content="python:option[1]" />
-              </select>
-            </td>
-            <td tal:content="row/uploaded_by" ></td>
-            <td tal:content="row/upload_date" ></td>
-            <td tal:content="row/msg" ></td>
-            <td>
-              <div tal:repeat="key row/invalid_keys">
-                <span tal:replace="key" /><br />
-                <select tal:attributes="name string:${row/id}|${key}.valid_key:record">
-                  <option tal:repeat="new row/valid_keys"
-                          tal:attributes="value new"
-                          tal:content="new" />
+      <span tal:condition="info/wrong">
+        <h2>Uploads which must be corrected:</h2>
+        <form  action="" method="post" class="group"
+               tal:attributes="action info/action"
+               >
+          <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+            <tr>
+              <th></th>
+              <th>Filename</th>
+              <th>Data Layout</th>
+              <th>By</th>
+              <th>Date</th>
+              <th>Message</th>
+              <th>Unknown Fields</th>
+            </tr>            
+            <tr tal:repeat="row info/wrong"
+                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td align="left" valign="middle" style="width: 5px;">
+                <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                       tal:define="id string:${row/id}.csv"
+                       tal:attributes="value id;
+                       id python:'cb_' + id;
+                       checked python:id in info['choosen_ids'];" 
+                       />
+              </td>
+              <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a>  </td>
+              <td tal:content="string:${row/id}.csv" ></td>
+              <td>
+                <select name="import_layout:record" tal:attributes="name string:${row/id}.import_layout:record">
+                  <option tal:repeat="option python: context.portal_vocabularies.import_names.items()"
+                          tal:attributes="value python: option[0];
+                          selected python: option[0] == row['import_layout']" 
+                          tal:content="python:option[1]" />
                 </select>
-              </div>
-            </td>
-            <td tal:condition="python:0"> 
-            <a href="edit" tal:attributes="href string:${row/url}/external_edit_form"
-                target="edit"
-                onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
-                [edit]
+              </td>
+              <td tal:content="row/uploaded_by" ></td>
+              <td tal:content="row/upload_date" ></td>
+              <td tal:content="row/msg" ></td>
+              <td>
+                <div tal:repeat="key row/invalid_keys">
+                  <span tal:replace="key" /><br />
+                  <select tal:attributes="name string:${row/id}|${key}.valid_key:record">
+                    <option tal:repeat="new row/valid_keys"
+                            tal:attributes="value new"
+                            tal:content="new" />
+                  </select>
+                </div>
+              </td>
+              <td tal:condition="python:0"> 
+                <a href="edit" tal:attributes="href string:${row/url}/external_edit_form"
+                   target="edit"
+                   onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+                  [edit]
                 </a> 
-            </td>
-
-          </tr>
-        </table>
-        
-        <br />
-
-        <input tal:condition="nothing" type="button" value="button_select_all" class="context"
-               onclick="someJavaScriptFunctionThatWillBeReplaced"
-               i18n:attributes="value"
-               tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
-               % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
-               />
-        <input type="submit" name="edit" value="Edit"
-               class="destructive" i18n:attributes="value"
-               />
-        <input type="submit" name="folder_delete:method" value="button_delete"
-               class="destructive" i18n:attributes="value"
-               tal:attributes="onclick python:'return window.confirm(\'%s\')' %
-               (cpsmcat('description_confirm_delete'), )" 
-               />
-
-      </form>
+              </td>
+            </tr>
+          </table>
+          <br />
+          <input tal:condition="nothing" type="button" value="button_select_all" class="context"
+                 onclick="someJavaScriptFunctionThatWillBeReplaced"
+                 i18n:attributes="value"
+                 tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                 />
+          <input type="submit" name="edit" value="edit"
+                 class="destructive" i18n:attributes="value"
+                 />
+          <input type="submit" name="folder_delete:method" value="button_delete"
+                 class="destructive" i18n:attributes="value"
+                 tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                 (cpsmcat('description_confirm_delete'), )" 
+                 />
+        </form>
+      </span>
+      <span tal:condition="info/importable">
+        <h2>Importable Uploads:</h2>
+        <form action="" method="post" class="group"
+              tal:attributes="action info/action"
+              >
+          <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+            <tr>
+              <th></th>
+              <th>Filename</th>
+              <th>Data Layout</th>
+              <th>By</th>
+              <th>Date</th>
+            </tr>            
+            <tr tal:repeat="row info/importable"
+                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td align="left" valign="middle" style="width: 5px;">
+                <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                       tal:define="id string:${row/id}.csv"
+                       tal:attributes="value id;
+                       id python:'cb_' + id;
+                       checked python:id in info['choosen_ids'];" 
+                       />
+              </td>
+              <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a>  </td>
+              <td tal:content="string:${row/id}.csv" ></td>
+              <td tal:content="row/import_layout"></td>
+              <td tal:content="row/uploaded_by" ></td>
+              <td tal:content="row/upload_date" ></td>
+              <td tal:content="row/msg" ></td>
+            </tr>
+          </table>
+          <br />
+          <input tal:condition="nothing" type="button" value="button_select_all" class="context"
+                 onclick="someJavaScriptFunctionThatWillBeReplaced"
+                 i18n:attributes="value"
+                 tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                 % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                 />
+          <input type="submit" name="import_uploads:method" value="import"
+                 class="destructive" i18n:attributes="value"
+                 tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                 (cpsmcat('description_confirm_delete'), )" 
+                 />
+          <input type="submit" name="folder_delete:method" value="button_delete"
+                 class="destructive" i18n:attributes="value"
+                 tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                 (cpsmcat('description_confirm_delete'), )" 
+                 />
+        </form>
+      </span>
+      <span tal:condition="info/imported">
+        <h2>Imported Uploads:</h2>
+        <form action="" method="post" class="group"
+              tal:attributes="action info/action"
+              >
+          <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">      
+            <tr>
+              <th>Filename</th>
+              <th>Data Layout</th>
+              <th>By</th>
+              <th>Date</th>
+              <th>Import Date</th>
+              <th>Message</th>
+            </tr>            
+            <tr tal:repeat="row info/imported"
+                tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+              <td tal:condition="nothing"> <a href="view" tal:attributes="href string:${row/url}"> <span tal:content="row/id" /></a>  </td>
+              <td tal:content="string:${row/id}.done" ></td>
+              <td tal:content="row/import_layout"></td>
+              <td tal:content="row/uploaded_by" ></td>
+              <td tal:content="row/upload_date" ></td>
+              <td tal:content="row/imported_at" ></td>
+              <td tal:content="row/msg"></td>
+            </tr>
+          </table>
+        </form>
+      </span>
     </metal:main>
-    
     <metal:sub fill-slot="sub"/>
   </metal:body>
Index: WAeUP_SRP/base/skins/waeup_upload/uploads_index.py
===================================================================
--- WAeUP_SRP/base/skins/waeup_upload/uploads_index.py	(revision 3291)
+++ WAeUP_SRP/base/skins/waeup_upload/uploads_index.py	(revision 3292)
@@ -1,3 +1,3 @@
-## Script (Python) "getUploadsInfo"
+## Script (Python) "uploads_index"
 ##bind container=container
 ##bind context=context
@@ -5,8 +5,8 @@
 ##bind script=script
 ##bind subpath=traverse_subpath
-##parameters=student=None
+##parameters=
 ##title=
 ##
-# $Id:getUploadsInfo.py 486 2006-09-06 10:09:39Z joachim $
+# $Id:uploads_index.py 486 2006-09-06 10:09:39Z joachim $
 """
 return Info about the Uploads
@@ -35,5 +35,4 @@
 info['doc'] = context.getContent()
 
-items = []
 edit = request.form.has_key('edit')
 ids = request.get('ids',[])
@@ -59,5 +58,9 @@
         request.RESPONSE.redirect(context.absolute_url())
 
+wrong = []
+imported = []
+importable = []
 for id,upload in context.objectItems():
+    add_to = wrong
     row = {}
     doc = upload.getContent()
@@ -67,12 +70,27 @@
     row['title'] = doc.filename
     row['url'] = upload.absolute_url()
-    row['msg'], row['invalid_keys'] = doc['checkKeys']()
+    row['imported'] = False
+    row['invalid_keys'] = []
+    import_message = getattr(doc,'import_message','')
+    if import_message:
+        row['imported'] = True
+        row['msg'] = import_message
+        row['imported_at'] = doc.imported_at.strftime("%d/%m/%y %H:%M:%S")
+        add_to = imported
+    else:
+        row['msg'],row['invalid_keys'] = doc['checkKeys']()
+        if not row['msg'] and not row['invalid_keys']:
+            add_to = importable
     row['filename'] = doc.filename
     row['import_layout'] = doc.import_layout
     row['upload_date'] =  doc.upload_date.strftime("%d/%m/%y %H:%M:%S")
     row['uploaded_by'] = doc.uploaded_by
-    items.append(row)
-items.sort()
-info['items'] = items
+    add_to.append(row)
+wrong.sort()
+imported.sort()
+importable.sort()
+info['wrong'] = wrong
+info['imported'] = imported
+info['importable'] = importable
 
 validate = "upload" in request.keys()
