source: WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_default/waeup_search_form.pt @ 11849

Last change on this file since 11849 was 1719, checked in by Henrik Bettermann, 18 years ago

fixed (in custom)

File size: 4.2 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                     sort_by python:request.get('sort_by', '');
8                     direction python:request.get('direction', '');
9                     folder_prefix python:request.get('folder_prefix', '');
10                     items python:here.search(query=request.form,
11                                              sort_by=sort_by,
12                                              direction=direction,
13                                              folder_prefix=folder_prefix);
14                     no_form python:1;
15                     site_wide python:1;
16                     items_length python:len(items);
17                     format string:detail;
18                     filter python:0;
19                     title_search request/title_search|nothing;
20                     swr request/search_within_results|nothing;
21                    ">
22
23    <div style="text-align:right;" class="group">
24      <form id="searchFormBottom" method="get" action="waeup_search_form"
25        onsubmit="return checkEmptySearch(this)">
26        <div class="label">
27          <label for="resultSearchText"
28                 i18n:translate="label_text_to_search">
29            Text to search:
30          </label>
31        <input type="text" name="SearchableText" id="resultSearchText"
32               value="" class="focus" size="40"
33               tal:attributes="value SearchableText" />
34        <input class="standalone searchButton" type="submit" value="button_ok"
35               i18n:attributes="value" />
36        </div>
37        <tal:block condition="not:swr">
38          <metal:block
39            use-macro="here/generic_lib_search_folder_prefix_option/macros/search_folder_prefix_option" />
40        </tal:block>
41        <tal:block condition="swr"
42          define="criteria python:['search_within_results', 'title_search',
43                                   'folder_prefix', 'review_state'];
44                  criteria_list python:['portal_type'];">
45          <tal:block repeat="criterion criteria">
46            <input type="hidden" tal:condition="value"
47              tal:define="value request/?criterion|nothing"
48              tal:attributes="name criterion;
49                              value value" />
50          </tal:block>
51          <tal:block repeat="criterion criteria_list">
52            <tal:block tal:condition="values"
53               tal:define="values request/?criterion|nothing">
54              <tal:block repeat="value values">
55                <input type="hidden"
56                  tal:define="value value"
57                  tal:attributes="name python:criterion+':list'; value value" />
58              </tal:block>
59            </tal:block>
60          </tal:block>
61        </tal:block>
62     </form>
63    </div>
64                   
65    <h3 tal:condition="not:title_search"
66      i18n:translate="heading_search_results">Search Results</h3>
67    <h3 tal:condition="title_search"
68      tal:content="title_search">Title for search results</h3>
69
70
71     
72<table width="100%" cellspacing="0" cellpadding="2"
73      class="folderButtons"
74      tal:define="can_add python:checkPerm('Add portal content', here);
75                  can_del python:checkPerm('Delete objects', here);">
76
77
78
79  <thead>
80  <tr><td><strong>Title</strong></td><td><strong>Id</strong></td><td><strong>Type</strong></td>
81      <td><strong>Status</strong></td></tr>
82  </thead>
83
84  <tbody tal:repeat="item items">
85
86  <tr><td></td><td></td><td></td></tr>
87
88  <tr tal:define="objURL string:${item/getURL}/view;
89                  objPath item/getPath;
90                  title item/Title;
91                 ">
92  <td>
93  <a href="url"
94      tal:attributes="href objURL">
95   <span tal:content="python: title or '(No title)'" />
96  </a>
97  </td>
98
99  <td i18n:translate="">
100    <span tal:replace="item/id" />
101  </td>
102 
103  <td>
104    <span tal:replace="item/portal_type" />
105  </td>
106
107  <td>
108    <span tal:replace="item/review_state" />
109  </td>
110
111 </tr>
112 </tbody>
113</table>
114    <div style="text-align:right;" class="group">
115    </div>
116  </tal:block>
117
118  </metal:block>
119  </body>
120</html>
Note: See TracBrowser for help on using the repository browser.