source: WAeUP_SRP/trunk/skins/waeup_academics/academics_search_view.pt @ 5224

Last change on this file since 5224 was 1783, checked in by Henrik Bettermann, 18 years ago
  • assertViewable removed and page templates adjusted, so that no traceback occurs.
  • 'Previous Session' action added
  • waeup_content_master.pt removed
  • and more
  • Property svn:keywords set to Id
File size: 6.4 KB
RevLine 
[600]1<metal:html tal:define="rendered options/rendered;
2            portal_status_message options/psm;
3            objects options/objects;
[911]4            is_so options/is_so;
[611]5            "
[600]6            >
7  <metal:body use-macro="here/main_template/macros/master">
8    <metal:block fill-slot="header"
9                 tal:define="creation creation|nothing;
10                 edition edition|nothing;
11                 metadata metadata|nothing"
12                 >
13    </metal:block>
14   
15    <metal:main fill-slot="main">
[911]16      <span tal:condition="not: is_so">
[1783]17        <span tal:content="here/illegal_view" />
[600]18      </span>
[911]19      <span tal:condition="is_so"
[600]20        tal:define="items objects;
21        columns python:3;
22        items_per_page python:40;
23        max_items python:300;
24        zoom python:0;
25        batches_all python:here.getBatchList(items,columns, items_per_page,zoom,max_items=400);
26        batches python:batches_all[0];
27        batch_info python:batches_all[1];
28        zoomed python:batches_all[2];
29        mq nocall:modules/ZTUtils/make_query;"
30        tal:omit-tag=""
31        >
32        <span tal:replace="structure rendered" />
[611]33          <form action="search" method="post" class="group"
34                tal:attributes="action context/absolute_url"
35                >
[600]36        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
37          <div class="batchLayout">
38            <span i18n:translate="">
39              Objects:
40              <strong>
41                <tal:block replace="batch_info/start"
42                           i18n:name="batch_start" /> - <tal:block replace="batch_info/limit"
43                                                                   i18n:name="batch_limit" />
44              </strong>
45              of <tal:block replace="batch_info/length"
46                            i18n:name="batch_length" />
47            </span>
48          </div>
49          <br />
50        </tal:block>
51        <table class="contentListing" width="100%">
52          <span tal:repeat="rows batches" tal:omit-tag="">
[611]53            <tr tal:repeat="object rows"
54                tal:attributes="class python:test(repeat['object'].even(), 'even ajaxtd', 'odd ajaxtd')">
55                <td align="left" valign="middle" style="width: 5px;"
[911]56                    tal:condition="is_so">
[611]57                  <input type="checkbox" name="ids:list" value="" id="" class="noborder"
[911]58                         tal:condition="is_so"
[611]59                         tal:define="id object/id"
60                         tal:attributes="value id;
61                         id python:'cb_' + id;
62                         checked python:id in options['choosen_ids'];"
63                         />
64                </td>
65              <td><a href="id" tal:attributes="href string:${object/url}"
66                     tal:content="object/title"></a></td>   
[600]67              <td>
[611]68                <span tal:replace="object/review_state" />
[600]69              </td>   
[611]70              <td>
71                <a tal:condition="object/is_editable"
72                    href="edit" tal:attributes="href string:${object/url}/external_edit_form"
73                    target="edit"
74                    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')">
75                    [edit]
76                    </a>
77                </td>               
[600]78            </tr>
79          </span>
80        </table>
[611]81        <table width="100%" cellspacing="0" cellpadding="2"
82               summary="buttons"
83               class="folderButtons">
84          <tr>
85            <td align="left" valign="top" rowspan="3"></td>
86            <td align="left" valign="top">
[911]87              <span tal:condition="is_so">
[611]88                <input type="button" value="button_select_all" class="context"
89                       onclick="someJavaScriptFunctionThatWillBeReplaced"
90                       i18n:attributes="value"
91                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
92                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
93                       />
94                <input type="submit" name="folder_delete:method" value="button_delete"
95                       class="destructive" i18n:attributes="value"
96                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
97                       (cpsmcat('description_confirm_delete'), )"
98                       />
99              </span>
100            </td>
101          </tr>
102        </table>
[600]103        <tal:block condition="python:batch_info and batch_info['nb_pages'] > 1">
104          <div class="pageNavigationLayout">
105            <a tal:define="previous batch_info/previous"
106               tal:condition="python:previous is not None"
107               tal:attributes="href python:'%s?%s'%(request['URL'],
108               mq(request.form, b_start=0))"
109               >
110            (&lt;&lt;)</a>
111            <a tal:define="previous batch_info/previous"
112               tal:condition="python:previous is not None"
113               tal:attributes="href python:'%s?%s'%(request['URL'],
114               mq(request.form, b_start=previous))"
115               i18n:translate="batch_previous">Previous</a>
116            <tal:block repeat="page batch_info/pages">
117              <tal:block condition="python:page != batch_info['start'] - 1">
118                <a tal:attributes="href python:'%s?%s'%(request['URL'],
119                mq(request.form, b_start=page))"
120                tal:content="repeat/page/number">1</a>&nbsp;
121              </tal:block>
122              <tal:block condition="python:page == batch_info['start'] - 1">
123                <span tal:content="string:${repeat/page/number}" />&nbsp;
124              </tal:block>
125            </tal:block>
126            <a tal:define="next batch_info/next"
127               tal:condition="python:next is not None"
128               tal:attributes="href python:'%s?%s'%(request['URL'],
129               mq(request.form, b_start=next))"
130               i18n:translate="batch_next">Next</a>
131            <a tal:define="next batch_info/next;
132            last_page python:batch_info['pages'][-1]"
133            tal:condition="python:next is not None"
134            tal:attributes="href python:'%s?%s'%(request['URL'],
135            mq(request.form, b_start=last_page))"
136            >
137            (&gt;&gt;)</a>
138          </div>
139        </tal:block>
[611]140        </form>
[600]141      </span>
142    </metal:main>
143  </metal:body>
144</metal:html>
145 
Note: See TracBrowser for help on using the repository browser.