Index: /WAeUP_SRP/trunk/skins/waeup_academics/academics_search_view.pt
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_academics/academics_search_view.pt	(revision 610)
+++ /WAeUP_SRP/trunk/skins/waeup_academics/academics_search_view.pt	(revision 611)
@@ -2,5 +2,6 @@
             portal_status_message options/psm;
             objects options/objects;
-            is_manager options/is_manager;"
+            is_manager options/is_manager;
+            "
             >
   <metal:body use-macro="here/main_template/macros/master">
@@ -30,4 +31,7 @@
         >
         <span tal:replace="structure rendered" />
+          <form action="search" method="post" class="group"
+                tal:attributes="action context/absolute_url"
+                >
         <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
           <div class="batchLayout">
@@ -47,17 +51,53 @@
         <table class="contentListing" width="100%">
           <span tal:repeat="rows batches" tal:omit-tag="">
-            <tr tal:repeat="student rows"
-                tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
-              <td><a href="id" tal:attributes="href string:${student/student/absolute_url}"
-                     tal:content="student/id"></a></td>    
+            <tr tal:repeat="object rows"
+                tal:attributes="class python:test(repeat['object'].even(), 'even ajaxtd', 'odd ajaxtd')">
+                <td align="left" valign="middle" style="width: 5px;" 
+                    tal:condition="is_manager">
+                  <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                         tal:condition="is_manager"
+                         tal:define="id object/id"
+                         tal:attributes="value id;
+                         id python:'cb_' + id;
+                         checked python:id in options['choosen_ids'];" 
+                         />
+                </td>
+              <td><a href="id" tal:attributes="href string:${object/url}"
+                     tal:content="object/title"></a></td>    
               <td>
-                <span tal:replace="python: student['per_doc'].firstname" />
-                <span tal:replace="python: student['per_doc'].middlename" />
-                <span tal:replace="python: student['per_doc'].lastname" />
+                <span tal:replace="object/review_state" />
               </td>    
-              <td><span tal:replace="python: student['app_doc'].jamb_reg_no" /></td>    
-              <td><span tal:replace="student/review_state" /></td>    
+              <td>
+                <a tal:condition="object/is_editable"
+                    href="edit" tal:attributes="href string:${object/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>
           </span>
+        </table>
+        <table width="100%" cellspacing="0" cellpadding="2"
+               summary="buttons"
+               class="folderButtons">
+          <tr>
+            <td align="left" valign="top" rowspan="3"></td>
+            <td align="left" valign="top">
+              <span tal:condition="is_manager">
+                <input 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="folder_delete:method" value="button_delete"
+                       class="destructive" i18n:attributes="value"
+                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                       (cpsmcat('description_confirm_delete'), )" 
+                       />
+              </span>
+            </td>
+          </tr>
         </table>
         <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
@@ -98,4 +138,5 @@
           </div>
         </tal:block>
+        </form>
       </span>
     </metal:main>
Index: /WAeUP_SRP/trunk/skins/waeup_academics/searchAcademics.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_academics/searchAcademics.py	(revision 610)
+++ /WAeUP_SRP/trunk/skins/waeup_academics/searchAcademics.py	(revision 611)
@@ -20,4 +20,5 @@
 lt = context.portal_layouts
 pr = context.portal_registration
+mtool = context.portal_membership
 path_info = request.get('PATH_INFO').split('/')
 is_manager = context.isManager
@@ -47,7 +48,5 @@
 state = ds.get('review_state')
 term = ds.get('search_string')
-if state == " ----- ":
-    state = ''
-if not term and what in ('student_edit','jamb_reg_no','name','matric_no'):
+if not term and not with_review:
     return context.academics_search_view(rendered = rend,
                              psm = "You must specify a search string",
@@ -56,38 +55,55 @@
                              is_manager = is_manager,
                              )
-onlyreview = state and what == "review_state"
+with_review = state != "all"
+what = ds.get('search_mode')
+state = ds.get('review_state')
+term = ds.get('search_string')
+err = False
+with_review = state != "all"
+if not term and not with_review:
+    psm = "You must specify a search string when searching 'all states'."
+    err = True
+elif '*' in term:
+    psm = "you cannot use the '*' alone"
+    err = True
+if err:
+    return context.academics_search_view(rendered = rend,
+                             psm = psm,
+                             #psm = "%s, %s" % (psm,ds),
+                             students = items,
+                             is_manager = is_manager,
+                             )
+with_review = state != "all"
 items = []
 res = []
-portal_type_query = {'query':['Department','Course','CertificateCourse']}
+portal_type_query = {'query':['Course','CertificateCourse']}
+onlyreview = with_review and not term
 if onlyreview:
     res = catalog(portal_type=portal_type_query,
                   review_state=state)
-elif what == "student_id":
-    res = catalog(portal_type='Student',
-                  id = term.strip())
-elif what == "jamb_reg_no":
-    res = catalog(portal_type='StudentApplication',
+elif what == "course":
+    res = catalog(portal_type='Course',
                   SearchableText="%s*" % term.strip().lower())
-elif what == "matric_no":
-    res = catalog(portal_type='StudentClearance',
+elif what == "certificate_course":
+    res = catalog(portal_type='CertificateCourse',
                   SearchableText="%s*" % term.strip().lower())
-elif what == "name":
-    res = catalog(portal_type=portal_type_query,
-                  SearchableText="%s*" % term.strip())
+objects = []
 if res:
     for r in res:
         row = {}
-        if r.portal_type in ("StudentApplication","StudentPersonal"):
-            items.append(r.getObject().aq_parent)
-        else:
-            items.append(r.getObject())
-objects = []
-if items:
-    for item in items:
-        objects.append(context.getStudentInfo(item))
+        ro = r.getObject()
+        rd = ro.getContent()
+        row['id'] = r.getId
+        row['title'] = rd.Title()
+        row['url'] = ro.absolute_url()
+        row['review_state'] = wf.getInfoFor(ro,'review_state','None')
+        row['is_editable'] = mtool.checkPermission('Modify portal content', ro)
+        objects.append(row)
+        #objects.append(context.getStudentInfo(item))
 return context.academics_search_view(rendered = rend,
-                             psm = "%d matching objects found" % len(items),
+                             psm = "%d matching objects found" % len(objects),
                              #psm = "%s, %s" % (psm,ds),
                              objects = objects,
                              is_manager = is_manager,
+                             choosen_ids = []
                              )
