source: WAeUP_SRP/base/skins/waeup_default/waeup_search_form.pt @ 2308

Last change on this file since 2308 was 2308, checked in by Henrik Bettermann, 17 years ago

simplify search to improve speed

File size: 2.4 KB
Line 
1<html xmlns:tal="http://xml.zope.org/namespaces/tal"
2      xmlns:metal="http://xml.zope.org/namespaces/metal"
3      metal:use-macro="here/main_template/macros/master">
4  <body>
5  <metal:block metal:fill-slot="main">
6  <tal:block define="SearchableText python:request.get('SearchableText','');
7                     items python:here.waeup_search(query=request.form);
8                     items_length python:len(items);
9                     title_search request/title_search|nothing;
10                    ">
11
12    <div style="text-align:left;" class="group">
13      <form id="searchFormBottom" method="get" action="waeup_search_form"
14        onsubmit="return checkEmptySearch(this)">
15        <div class="label">
16          <label for="resultSearchText"
17                 i18n:translate="label_text_to_search">
18            Text to search:
19          </label>
20        <input type="text" name="SearchableText" id="resultSearchText"
21               value="" class="focus" size="40"
22               tal:attributes="value SearchableText" />
23        <input class="standalone searchButton" type="submit" value="button_ok"
24               i18n:attributes="value" />
25        </div>
26       
27     </form>
28    </div>
29                   
30    <h3 tal:condition="not:title_search"
31      i18n:translate="heading_search_results">Search Results</h3>
32    <h3 tal:condition="title_search"
33      tal:content="title_search">Title for search results</h3>
34
35
36     
37<table width="100%" cellspacing="0" cellpadding="2"
38      class="folderButtons"
39      tal:define="can_add python:checkPerm('Add portal content', here);
40                  can_del python:checkPerm('Delete objects', here);">
41
42
43
44  <thead>
45  <tr><td><strong>Title</strong></td><td><strong>Id</strong></td><td><strong>Type</strong></td>
46      <td><strong>Status</strong></td></tr>
47  </thead>
48
49  <tbody tal:repeat="item items">
50
51  <tr><td></td><td></td><td></td></tr>
52
53  <tr tal:define="objURL string:${item/getURL}/view;
54                  objPath item/getPath;
55                  title item/Title;
56                 ">
57  <td>
58  <a href="url"
59      tal:attributes="href objURL">
60   <span tal:content="python: title or '(No title)'" />
61  </a>
62  </td>
63
64  <td i18n:translate="">
65    <span tal:replace="item/id" />
66  </td>
67 
68  <td>
69    <span tal:replace="item/portal_type" />
70  </td>
71
72  <td>
73    <span tal:replace="item/review_state" />
74  </td>
75
76 </tr>
77 </tbody>
78</table>
79    <div style="text-align:right;" class="group">
80    </div>
81  </tal:block>
82
83  </metal:block>
84  </body>
85</html>
Note: See TracBrowser for help on using the repository browser.