Ignore:
Timestamp:
28 Sep 2006, 19:09:45 (18 years ago)
Author:
joachim
Message:

search form for students ready for testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/students_manager_view.pt

    r572 r584  
    1 <metal:html tal:define="info context/searchStudents;
    2                         students info/students;
    3                         is_manager info/is_manager;">
    4 
     1<metal:html tal:define="rendered options/rendered;
     2            portal_status_message options/psm;
     3            students options/students;
     4            is_manager options/is_manager;"
     5            >
    56  <metal:body use-macro="here/main_template/macros/master">
    6 
    7     <metal:main fill-slot="main"
    8                 tal:define="isManager python:'Manager' in member.getRoles() or 'SectionManager' in member.getRoles()">
    9       <span tal:condition="not: isManager">
     7    <metal:block fill-slot="header"
     8                 tal:define="creation creation|nothing;
     9                 edition edition|nothing;
     10                 metadata metadata|nothing"
     11                 >
     12    </metal:block>
     13   
     14    <metal:main fill-slot="main">
     15      <span tal:condition="not: is_manager">
    1016        <metal:block use-macro="here/error_not_found/macros/not_found" />
    1117      </span>
    12       <span tal:condition="isManager">
    13       <h3>Search Students by</h3>
    14       <br />
    15       <form  action="." method="post" tal:attributes="action string: ${context/absolute_url}/students_manager_view">
    16         <table>           
    17           <tr>           
    18             <td>Status</td><td><div class="field"><span tal:condition="python:0" tal:content="info/wf_states"/>
    19                 <select name="state" tal:condition="python:1">
    20                   <option value="state"
    21                           tal:repeat="state info/wf_states"
    22                           tal:attributes="value state;selected python: info['state'] == state"
    23                           tal:content="state"></option>
    24                 </select>
    25               </div>
    26             </td>
    27           </tr>
    28           <tr>           
    29               <td>StudentId</td><td><input type="text" name="student_id"
    30                                            tal:attributes="value info/student_id"/></td>
    31               <td>Student Name</td><td><input type="text" name="name"
    32                                               tal:attributes="value info/name"/></td>
     18      <span tal:condition="is_manager"
     19        tal:define="items students;
     20        columns python:3;
     21        items_per_page python:40;
     22        max_items python:300;
     23        zoom python:0;
     24        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
     25        batches python:batches_all[0];
     26        batch_info python:batches_all[1];
     27        zoomed python:batches_all[2];
     28        mq nocall:modules/ZTUtils/make_query;"
     29        tal:omit-tag=""
     30        >
     31        <span tal:replace="structure rendered" />
     32        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
     33          <div class="batchLayout">
     34            <span i18n:translate="">
     35              Objects:
     36              <strong>
     37                <tal:block replace="batch_info/start"
     38                           i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
     39                                                                   i18n:name="batch_limit" />
     40              </strong>
     41              of <tal:block replace="batch_info/length"
     42                            i18n:name="batch_length" />
     43            </span>
     44          </div>
     45          <br />
     46        </tal:block>
     47        <table class="contentListing" width="100%">
     48          <span tal:repeat="rows batches" tal:omit-tag="">
     49            <tr tal:repeat="student rows"
     50                tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
     51              <td><a href="id" tal:attributes="href string:${student/student/absolute_url}"
     52                     tal:content="student/id"></a></td>   
     53              <td>
     54                <span tal:replace="python: student['per_doc'].firstname" />
     55                <span tal:replace="python: student['per_doc'].middlename" />
     56                <span tal:replace="python: student['per_doc'].lastname" />
     57              </td>   
     58              <td><span tal:replace="python: student['app_doc'].jamb_reg_no" /></td>   
     59              <td><span tal:replace="student/review_state" /></td>   
    3360            </tr>
    34             <tr>
    35               <td>Matric No</td><td><input type="text" name="matric_no"
    36                                            tal:attributes="value info/matric_no"/></td>
    37               <td>JAMB Id</td><td><input type="text" name="jamb_id"
    38                                          tal:attributes="value info/jamb_id"/></td>
    39             </tr>
    40           <tr><td><input type="submit" class="context" name="search" value="search" /></td></tr>
    41             </table>
    42       </form>
    43         <table tal:condition="students">
    44           <tr tal:repeat="student students">
    45             <td><a href="id" tal:attributes="href string:${student/absolute_url}"
    46                    tal:content="student/getId"></a></td>   
    47             <span tal:omit-tag="" tal:define="info python: context.getStudentInfo(student)">
    48             <td><span tal:replace="python: info['per_doc'].lastname" /></td>   
    49             <td><span tal:replace="python: info['app_doc'].jamb_reg_no" /></td>   
    50             <td><span tal:replace="info/review_state" /></td>   
    51             </span>
    52           </tr>
     61          </span>
    5362        </table>
     63        <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
     64          <div class="pageNavigationLayout">
     65            <a tal:define="previous batch_info/previous"
     66               tal:condition="python:previous is not None"
     67               tal:attributes="href python:'%s?%s'%(request['URL'],
     68               mq(request.form, b_start=0))"
     69               >
     70            (&lt;&lt;)</a>
     71            <a tal:define="previous batch_info/previous"
     72               tal:condition="python:previous is not None"
     73               tal:attributes="href python:'%s?%s'%(request['URL'],
     74               mq(request.form, b_start=previous))"
     75               i18n:translate="batch_previous">Previous</a>
     76            <tal:block repeat="page batch_info/pages">
     77              <tal:block condition="python:page != batch_info['start'] - 1">
     78                <a tal:attributes="href python:'%s?%s'%(request['URL'],
     79                mq(request.form, b_start=page))"
     80                tal:content="repeat/page/number">1</a>&nbsp;
     81              </tal:block>
     82              <tal:block condition="python:page == batch_info['start'] - 1">
     83                <span tal:content="string:${repeat/page/number}" />&nbsp;
     84              </tal:block>
     85            </tal:block>
     86            <a tal:define="next batch_info/next"
     87               tal:condition="python:next is not None"
     88               tal:attributes="href python:'%s?%s'%(request['URL'],
     89               mq(request.form, b_start=next))"
     90               i18n:translate="batch_next">Next</a>
     91            <a tal:define="next batch_info/next;
     92            last_page python:batch_info['pages'][-1]"
     93            tal:condition="python:next is not None"
     94            tal:attributes="href python:'%s?%s'%(request['URL'],
     95            mq(request.form, b_start=last_page))"
     96            >
     97            (&gt;&gt;)</a>
     98          </div>
     99        </tal:block>
    54100      </span>
    55101    </metal:main>
    56102  </metal:body>
    57103</metal:html>
     104 
Note: See TracChangeset for help on using the changeset viewer.