Index: WAeUP_SRP/trunk/skins/waeup_default/layout_search_edit.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_default/layout_search_edit.pt	(revision 584)
+++ WAeUP_SRP/trunk/skins/waeup_default/layout_search_edit.pt	(revision 584)
@@ -0,0 +1,84 @@
+<metal:block define-macro="default_edit"
+             tal:define="layout options/layout;
+             ds options/datastructure;
+             creation creation|nothing;
+             metadata metadata|nothing;
+             type_name request/type_name|nothing;
+             ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
+             creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ;
+             edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
+             metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
+             formaction options/formaction|string:.;
+             first_layout options/first_layout|python:0;
+             last_layout options/last_layout|python:0;
+             is_flexible options/is_flexible;
+             cpsmcat nocall:here/translation_service;
+             "
+             >
+  <form action='some' method='post'
+        enctype='multipart/form-data' 
+        class='workflow'
+        tal:attributes="action formaction">
+    <div class=''>
+      <div class='documentFields'>
+        <table width="80%" cellpadding="2" cellspacing="2" summary="Form layout">
+          <tr tal:repeat="row layout/rows" valign="top">
+            <td tal:repeat="cell row"
+                tal:attributes="colspan cell/ncols">
+              <tal:block define="widget cell/widget;
+              wid widget/getWidgetId;
+              dm options/datastructure/getDataModel;
+              err python:ds.getError(wid);
+              err_mapping python:ds.getErrorMapping(wid);
+              is_required widget/is_required|nothing;
+              tooltip_id python:wid + '_help';
+              widget_css_class cell/widget_css_class|nothing;
+              widget_css_class python:test(is_flexible, 'group', widget_css_class);
+              css_class python:test(err, 'row error',
+              test(is_flexible, 'group', 'row'))"
+              >
+                <div tal:attributes="class widget_css_class;
+                id python:widget.getHtmlWidgetId()+'_widget';"
+                >
+                  <div class="label" tal:condition="widget/label_edit"
+                       tal:attributes="class python:test(is_required, 'label required','label')">
+                    <label i18n:translate="" tal:condition="widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                    <label tal:condition="not:widget/is_i18n"
+                           tal:content="widget/label_edit"
+                           tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
+                  </div>
+                  <button type="button" class="tooltipControl"
+                          tal:condition="widget/help"
+                          tal:attributes="onclick python:'toggleElementVisibility(\'%s\')' % tooltip_id;"> ? </button>
+                  <div class="field">
+                    <div tal:replace="structure cell/widget_rendered"/>
+                  </div>
+                  <div class="tooltipArea" style="visibility: hidden;"
+                       tal:condition="widget/help"
+                       tal:attributes="id tooltip_id;
+                       onclick python:'showElement(false, \'%s\')' % tooltip_id;"
+                       >
+                    <tal:block i18n:translate="" tal:condition="widget/is_i18n"
+                               tal:content="widget/help">i18_key-help_for_this_field</tal:block>
+                    <tal:block tal:condition="not:widget/is_i18n"
+                               tal:content="widget/help">This is the help for this field</tal:block>
+                  </div>
+                  <tal:block condition="err">
+                    <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
+                      <br /><em style="color: red"
+                                tal:content="msg">err</em>
+                    </tal:block>
+                  </tal:block>
+                </div>
+              </tal:block>
+            </td>
+          </tr>
+        </table>
+        <input type="submit" class="standalone" name="cpsdocument_edit_button" value="Search" />
+      </div>        
+    </div>
+  </form>
+</metal:block>
+  
Index: WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 577)
+++ WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py	(revision 584)
@@ -33,4 +33,5 @@
 #info['wf_state'] = 'keiner'
 info['student'] = student
+info['id'] = student.getId()
 info['student_doc'] = student.getContent()
 info['app'] = student.application
Index: WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py	(revision 577)
+++ WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py	(revision 584)
@@ -5,5 +5,5 @@
 ##bind script=script
 ##bind subpath=traverse_subpath
-##parameters=student=None
+##parameters=
 ##title=
 ##
@@ -21,18 +21,39 @@
 info['wf_states'] = student_wf_states
 info['wf_states'][0] = " ----- "
-
 mtool = context.portal_membership
 member = mtool.getAuthenticatedMember()
+lt = context.portal_layouts
+pr = context.portal_registration
 path_info = request.get('PATH_INFO').split('/')
 roles = member.getRoles()
-info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
-student_id = fget('student_id')
-jamb_id = fget('jamb_id')
-matric_no = fget('matric_no')
-name = fget('name')
-state = fget('state')
+is_manager = 'Manager' in roles or 'SectionManager' in roles
+validate = request.has_key("cpsdocument_edit_button")
+items = []
+default = {'search_mode': 'name', 
+        'review_state': 'admission_applied ', 
+        'search_string': 'yy'
+        }
+        
+rend,psm,ds = lt.renderLayout(layout_id= 'student_search',
+                      schema_id= 'student_search',
+                      context=context,
+                      mapping=validate and request,
+                      ob=default,
+                      layout_mode='edit',
+                      formaction="searchStudents"
+                      )
+if psm == '':
+    return context.students_manager_view(rendered = rend,
+                             psm = psm,
+                             #psm = "%s, %s" % (psm,ds),
+                             students = items,
+                             is_manager = is_manager,
+                             )
+what = ds.get('search_mode')
+state = ds.get('review_state')
+term = ds.get('search_string')
 if state == " ----- ":
     state = ''
-onlyreview = state and not (student_id or jamb_id or matric_no or name)
+onlyreview = state and what == "review_state"
 items = []
 res = []
@@ -41,16 +62,16 @@
     res = catalog(portal_type=portal_type_query,
                   review_state=state)
-elif student_id:
+elif what == "student_id":
     res = catalog(portal_type='Student',
                   id = student_id.strip())
-elif jamb_id:
+elif what == "jamb_id":
     res = catalog(portal_type='StudentApplication',
-                  SearchableText="%s*" % jamb_id.strip().lower())
-elif matric_no:
+                  SearchableText="%s*" % term.strip().lower())
+elif what == "matric_no":
     res = catalog(portal_type='StudentClearance',
-                  SearchableText="%s*" % matric_no.strip().lower())
-elif name:
+                  SearchableText="%s*" % term.strip().lower())
+elif what == "name":
     res = catalog(portal_type=portal_type_query,
-                  SearchableText="%s*" % name.strip())
+                  SearchableText="%s*" % term.strip())
 if res:
     for r in res:
@@ -60,10 +81,12 @@
         else:
             items.append(r.getObject())
-info['state'] = state
-info['student_id'] = student_id
-info['jamb_id'] = jamb_id
-info['matric_no'] = matric_no
-info['name'] = name
-
-info['students'] = items
-return info
+students = []
+if items:
+    for item in items:
+        students.append(context.getStudentInfo(item))
+return context.students_manager_view(rendered = rend,
+                             psm = "%d matching Students found" % len(items),
+                             #psm = "%s, %s" % (psm,ds),
+                             students = students,
+                             is_manager = is_manager,
+                             )
Index: WAeUP_SRP/trunk/skins/waeup_student/students_index.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/students_index.py	(revision 577)
+++ WAeUP_SRP/trunk/skins/waeup_student/students_index.py	(revision 584)
@@ -29,5 +29,5 @@
 
 if isManager:
-    return redirect("%s/students_manager_view" % campus.students.absolute_url())
+    return redirect("%s/searchStudents" % campus.students.absolute_url())
 if isStudent:
     info = context.getStudentInfo()
Index: WAeUP_SRP/trunk/skins/waeup_student/students_manager_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_student/students_manager_view.pt	(revision 577)
+++ WAeUP_SRP/trunk/skins/waeup_student/students_manager_view.pt	(revision 584)
@@ -1,57 +1,104 @@
-<metal:html tal:define="info context/searchStudents;
-                        students info/students;
-                        is_manager info/is_manager;">
-
+<metal:html tal:define="rendered options/rendered;
+            portal_status_message options/psm;
+            students options/students;
+            is_manager options/is_manager;"
+            >
   <metal:body use-macro="here/main_template/macros/master">
-
-    <metal:main fill-slot="main"
-                tal:define="isManager python:'Manager' in member.getRoles() or 'SectionManager' in member.getRoles()">
-      <span tal:condition="not: isManager">
+    <metal:block fill-slot="header"
+                 tal:define="creation creation|nothing;
+                 edition edition|nothing;
+                 metadata metadata|nothing"
+                 >
+    </metal:block>
+    
+    <metal:main fill-slot="main">
+      <span tal:condition="not: is_manager">
         <metal:block use-macro="here/error_not_found/macros/not_found" />
       </span>
-      <span tal:condition="isManager">
-      <h3>Search Students by</h3>
-      <br />
-      <form  action="." method="post" tal:attributes="action string: ${context/absolute_url}/students_manager_view">
-        <table>           
-          <tr>            
-            <td>Status</td><td><div class="field"><span tal:condition="python:0" tal:content="info/wf_states"/>
-                <select name="state" tal:condition="python:1">
-                  <option value="state"
-                          tal:repeat="state info/wf_states"
-                          tal:attributes="value state;selected python: info['state'] == state"
-                          tal:content="state"></option>
-                </select>
-              </div>
-            </td>
-          </tr>
-          <tr>            
-              <td>StudentId</td><td><input type="text" name="student_id" 
-                                           tal:attributes="value info/student_id"/></td>
-              <td>Student Name</td><td><input type="text" name="name" 
-                                              tal:attributes="value info/name"/></td>
+      <span tal:condition="is_manager"
+        tal:define="items students;
+        columns python:3;
+        items_per_page python:40;
+        max_items python:300;
+        zoom python:0;
+        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
+        batches python:batches_all[0];
+        batch_info python:batches_all[1];
+        zoomed python:batches_all[2];
+        mq nocall:modules/ZTUtils/make_query;"
+        tal:omit-tag=""
+        >
+        <span tal:replace="structure rendered" />
+        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
+          <div class="batchLayout">
+            <span i18n:translate="">
+              Objects: 
+              <strong>
+                <tal:block replace="batch_info/start"
+                           i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
+                                                                   i18n:name="batch_limit" />
+              </strong>
+              of <tal:block replace="batch_info/length"
+                            i18n:name="batch_length" />
+            </span>
+          </div>
+          <br />
+        </tal:block>
+        <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>    
+              <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" />
+              </td>    
+              <td><span tal:replace="python: student['app_doc'].jamb_reg_no" /></td>    
+              <td><span tal:replace="student/review_state" /></td>    
             </tr>
-            <tr>
-              <td>Matric No</td><td><input type="text" name="matric_no" 
-                                           tal:attributes="value info/matric_no"/></td>
-              <td>JAMB Id</td><td><input type="text" name="jamb_id" 
-                                         tal:attributes="value info/jamb_id"/></td>
-            </tr>
-          <tr><td><input type="submit" class="context" name="search" value="search" /></td></tr>
-            </table>
-      </form>
-        <table tal:condition="students">
-          <tr tal:repeat="student students">
-            <td><a href="id" tal:attributes="href string:${student/absolute_url}"
-                   tal:content="student/getId"></a></td>    
-            <span tal:omit-tag="" tal:define="info python: context.getStudentInfo(student)">
-            <td><span tal:replace="python: info['per_doc'].lastname" /></td>    
-            <td><span tal:replace="python: info['app_doc'].jamb_reg_no" /></td>    
-            <td><span tal:replace="info/review_state" /></td>    
-            </span>
-          </tr>
+          </span>
         </table>
+        <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
+          <div class="pageNavigationLayout">
+            <a tal:define="previous batch_info/previous"
+               tal:condition="python:previous is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=0))"
+               >
+            (&lt;&lt;)</a>
+            <a tal:define="previous batch_info/previous"
+               tal:condition="python:previous is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=previous))"
+               i18n:translate="batch_previous">Previous</a>
+            <tal:block repeat="page batch_info/pages">
+              <tal:block condition="python:page != batch_info['start'] - 1">
+                <a tal:attributes="href python:'%s?%s'%(request['URL'],
+                mq(request.form, b_start=page))"
+                tal:content="repeat/page/number">1</a>&nbsp;
+              </tal:block>
+              <tal:block condition="python:page == batch_info['start'] - 1">
+                <span tal:content="string:${repeat/page/number}" />&nbsp;
+              </tal:block>
+            </tal:block>
+            <a tal:define="next batch_info/next"
+               tal:condition="python:next is not None"
+               tal:attributes="href python:'%s?%s'%(request['URL'],
+               mq(request.form, b_start=next))"
+               i18n:translate="batch_next">Next</a>
+            <a tal:define="next batch_info/next;
+            last_page python:batch_info['pages'][-1]"
+            tal:condition="python:next is not None"
+            tal:attributes="href python:'%s?%s'%(request['URL'],
+            mq(request.form, b_start=last_page))"
+            >
+            (&gt;&gt;)</a>
+          </div>
+        </tal:block>
       </span>
     </metal:main>
   </metal:body>
 </metal:html>
+  
