Changeset 1192 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
3 Jan 2007, 21:36:34 (18 years ago)
Author:
joachim
Message:

optimize search a little bit

Location:
WAeUP_SRP/trunk/skins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_default/layout_search_edit.pt

    r805 r1192  
    22             tal:define="layout options/layout;
    33             ds options/datastructure;
    4              creation creation|nothing;
    5              metadata metadata|nothing;
    6              type_name request/type_name|nothing;
    7              ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None);
    8              creation_form python:ti and ti.getActionById('create', 'cpsdocument_create_form') or 'cpsdocument_create_form' ;
    9              edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
    10              metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
    114             formaction options/formaction|string:.;
    12              first_layout options/first_layout|python:0;
    13              last_layout options/last_layout|python:0;
    145             is_flexible options/is_flexible;
    156             cpsmcat nocall:here/translation_service;
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r1096 r1192  
    8585                      schema_id= 'student_search',
    8686                      context=context,
    87                       mapping=validate and request,
     87                      mapping=validate and REQUEST,
    8888                      ob=default,
    8989                      layout_mode='edit',
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r1171 r1192  
    2828            and <span tal:repeat="department info/departments|nothing" tal:content="department"/></span>.
    2929          <br /><br />
    30 
    3130        <span tal:replace="structure rendered" />
    32        
    33       <span tal:condition="students"
    34         tal:define="items students;
    35         columns python:3;
    36         items_per_page python:40;
    37         max_items python:300;
    38         zoom python:0;
    39         batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
    40         batches python:batches_all[0];
    41         batch_info python:batches_all[1];
    42         zoomed python:batches_all[2];
    43         mq nocall:modules/ZTUtils/make_query;"
    44         tal:omit-tag=""
    45         >
    46         <tal:block tal:condition="python: items and batch_info and batch_info['nb_pages'] > 1">
    47           <div class="batchLayout">
    48             <span i18n:translate="">
    49               Objects:
    50               <strong>
    51                 <tal:block replace="batch_info/start"
    52                            i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
    53                                                                    i18n:name="batch_limit" />
    54               </strong>
    55               of <tal:block replace="batch_info/length"
    56                             i18n:name="batch_length" />
    57             </span>
    58           </div>
    59           <br />
    60         </tal:block>
    61         <table class="contentListing" width="100%">
    62           <span tal:repeat="rows batches" tal:omit-tag="">
    63             <span tal:repeat="student rows">
    64               <tr tal:condition="student"
    65                   tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
    66                 <td><a href="id" tal:attributes="href string:${context/portal_url}/campus/students/${student/id}"
    67                        tal:content="student/id"></a></td>   
    68                 <td>
    69                   <span tal:replace="student/name" />
    70                 </td>   
    71                 <td><span tal:replace="student/matric_no" /></td>   
    72                 <td><span tal:replace="student/jamb_reg_no" /></td>
    73                 <td tal:condition="options/co_view|nothing">
    74                        <a href="id"
    75                           tal:attributes="href string:${context/portal_url}/campus/students/${student/id}/clearance/external_clearance_edit_form"
    76                           target="edit"
    77                           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')"
    78                           >[view and change state]</a></td>
    79                 <td tal:condition="options/co_view|nothing"><span tal:replace="student/review_state|nothing" /></td>   
    80               </tr>
    81             </span>
     31        <span tal:condition="students">
     32          <span
     33              tal:define="items students;
     34              columns python:3;
     35              items_per_page python:40;
     36              max_items python:300;
     37              zoom python:0;
     38              batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
     39              batches python:batches_all[0];
     40              batch_info python:batches_all[1];
     41              zoomed python:batches_all[2];
     42              mq nocall:modules/ZTUtils/make_query;"
     43              tal:omit-tag=""
     44              >
     45            <tal:block tal:condition="python: items and batch_info and batch_info['nb_pages'] > 1">
     46              <div class="batchLayout">
     47                <span i18n:translate="">
     48                  Objects:
     49                  <strong>
     50                    <tal:block replace="batch_info/start"
     51                               i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
     52                                                                       i18n:name="batch_limit" />
     53                  </strong>
     54                  of <tal:block replace="batch_info/length"
     55                                i18n:name="batch_length" />
     56                </span>
     57              </div>
     58              <br />
     59            </tal:block>
     60            <table class="contentListing" width="100%">
     61              <span tal:repeat="rows batches" tal:omit-tag="">
     62                <span tal:repeat="student rows">
     63                  <tr tal:condition="student"
     64                      tal:attributes="class python:test(repeat['student'].even(), 'even ajaxtd', 'odd ajaxtd')">
     65                    <td><a href="id" tal:attributes="href string:${context/portal_url}/campus/students/${student/id}"
     66                           tal:content="student/id"></a></td>   
     67                    <td>
     68                      <span tal:replace="student/name" />
     69                    </td>   
     70                    <td><span tal:replace="student/matric_no" /></td>   
     71                    <td><span tal:replace="student/jamb_reg_no" /></td>
     72                    <td tal:condition="options/co_view|nothing">
     73                      <a href="id"
     74                         tal:attributes="href string:${context/portal_url}/campus/students/${student/id}/clearance/external_clearance_edit_form"
     75                         target="edit"
     76                         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')"
     77                         >[view and change state]</a></td>
     78                    <td tal:condition="options/co_view|nothing"><span tal:replace="student/review_state|nothing" /></td>   
     79                  </tr>
     80                </span>
     81              </span>
     82            </table>
     83            <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
     84              <div class="pageNavigationLayout">
     85                <a tal:define="previous batch_info/previous"
     86                   tal:condition="python:previous is not None"
     87                   tal:attributes="href python:'%s?%s'%(request['URL'],
     88                   mq(request.form, b_start=0))"
     89                   >
     90                (&lt;&lt;)</a>
     91                <a tal:define="previous batch_info/previous"
     92                   tal:condition="python:previous is not None"
     93                   tal:attributes="href python:'%s?%s'%(request['URL'],
     94                   mq(request.form, b_start=previous))"
     95                   i18n:translate="batch_previous">Previous</a>
     96                <tal:block repeat="page batch_info/pages">
     97                  <tal:block condition="python:page != batch_info['start'] - 1">
     98                    <a tal:attributes="href python:'%s?%s'%(request['URL'],
     99                    mq(request.form, b_start=page))"
     100                    tal:content="repeat/page/number">1</a>&nbsp;
     101                  </tal:block>
     102                  <tal:block condition="python:page == batch_info['start'] - 1">
     103                    <span tal:content="string:${repeat/page/number}" />&nbsp;
     104                  </tal:block>
     105                </tal:block>
     106                <a tal:define="next batch_info/next"
     107                   tal:condition="python:next is not None"
     108                   tal:attributes="href python:'%s?%s'%(request['URL'],
     109                   mq(request.form, b_start=next))"
     110                   i18n:translate="batch_next">Next</a>
     111                <a tal:define="next batch_info/next;
     112                last_page python:batch_info['pages'][-1]"
     113                tal:condition="python:next is not None"
     114                tal:attributes="href python:'%s?%s'%(request['URL'],
     115                mq(request.form, b_start=last_page))"
     116                >
     117                (&gt;&gt;)</a>
     118              </div>
     119            </tal:block>
    82120          </span>
    83         </table>
    84         <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
    85           <div class="pageNavigationLayout">
    86             <a tal:define="previous batch_info/previous"
    87                tal:condition="python:previous is not None"
    88                tal:attributes="href python:'%s?%s'%(request['URL'],
    89                mq(request.form, b_start=0))"
    90                >
    91             (&lt;&lt;)</a>
    92             <a tal:define="previous batch_info/previous"
    93                tal:condition="python:previous is not None"
    94                tal:attributes="href python:'%s?%s'%(request['URL'],
    95                mq(request.form, b_start=previous))"
    96                i18n:translate="batch_previous">Previous</a>
    97             <tal:block repeat="page batch_info/pages">
    98               <tal:block condition="python:page != batch_info['start'] - 1">
    99                 <a tal:attributes="href python:'%s?%s'%(request['URL'],
    100                 mq(request.form, b_start=page))"
    101                 tal:content="repeat/page/number">1</a>&nbsp;
    102               </tal:block>
    103               <tal:block condition="python:page == batch_info['start'] - 1">
    104                 <span tal:content="string:${repeat/page/number}" />&nbsp;
    105               </tal:block>
    106             </tal:block>
    107             <a tal:define="next batch_info/next"
    108                tal:condition="python:next is not None"
    109                tal:attributes="href python:'%s?%s'%(request['URL'],
    110                mq(request.form, b_start=next))"
    111                i18n:translate="batch_next">Next</a>
    112             <a tal:define="next batch_info/next;
    113             last_page python:batch_info['pages'][-1]"
    114             tal:condition="python:next is not None"
    115             tal:attributes="href python:'%s?%s'%(request['URL'],
    116             mq(request.form, b_start=last_page))"
    117             >
    118             (&gt;&gt;)</a>
    119           </div>
    120         </tal:block>
    121       </span>
     121        </span>
    122122      </span>
    123123    </metal:main>
Note: See TracChangeset for help on using the changeset viewer.