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 | nav_action string:search_form; |
---|
15 | no_form python:1; |
---|
16 | site_wide python:1; |
---|
17 | items_length python:len(items); |
---|
18 | format string:detail; |
---|
19 | filter python:0; |
---|
20 | title_search request/title_search|nothing; |
---|
21 | swr request/search_within_results|nothing; |
---|
22 | "> |
---|
23 | <h1 tal:condition="not:title_search" |
---|
24 | i18n:translate="heading_search_results">Search Results</h1> |
---|
25 | <h1 tal:condition="title_search" |
---|
26 | tal:content="title_search">Title for search results</h1> |
---|
27 | |
---|
28 | <p tal:condition="python:items_length == 0"> |
---|
29 | <tal:block i18n:translate="legend_no_search_result"> |
---|
30 | Your query gave no result. |
---|
31 | </tal:block> |
---|
32 | <tal:block i18n:translate="legend_search_for"> |
---|
33 | You searched for |
---|
34 | </tal:block> |
---|
35 | <span class="searchFor" tal:content="SearchableText">SearchableText</span>. |
---|
36 | </p> |
---|
37 | <p tal:condition="python:items_length == 1" |
---|
38 | i18n:translate="legend_one_search_result"> |
---|
39 | Your query gave 1 result. |
---|
40 | </p> |
---|
41 | <p tal:condition="python:items_length > 1" |
---|
42 | i18n:translate=""> |
---|
43 | Your query gave <span class="emphasis" |
---|
44 | tal:content="items_length" |
---|
45 | i18n:name="nb_results">n</span> results. |
---|
46 | </p> |
---|
47 | |
---|
48 | |
---|
49 | <table width="100%" cellspacing="0" cellpadding="2" |
---|
50 | class="folderButtons" |
---|
51 | tal:define="can_add python:checkPerm('Add portal content', here); |
---|
52 | can_del python:checkPerm('Delete objects', here);"> |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | <thead> |
---|
57 | <tr><td><strong>Title</strong></td><td><strong>Id</strong></td><td><strong>Type</strong></td> |
---|
58 | <td><strong>Status</strong></td></tr> |
---|
59 | </thead> |
---|
60 | |
---|
61 | <tbody tal:repeat="item items"> |
---|
62 | |
---|
63 | <tr><td></td><td></td><td></td></tr> |
---|
64 | |
---|
65 | <tr tal:define="objURL string:${item/getURL}/view; |
---|
66 | objPath item/getPath; |
---|
67 | title item/Title; |
---|
68 | "> |
---|
69 | <td> |
---|
70 | <a href="url" |
---|
71 | tal:attributes="href objURL"> |
---|
72 | <span tal:content="python: title or '(No title)'" /> |
---|
73 | </a> |
---|
74 | </td> |
---|
75 | |
---|
76 | <td i18n:translate=""> |
---|
77 | <span tal:replace="item/id" /> |
---|
78 | </td> |
---|
79 | |
---|
80 | <td> |
---|
81 | <span tal:replace="item/portal_type" /> |
---|
82 | </td> |
---|
83 | |
---|
84 | <td> |
---|
85 | <span tal:replace="item/review_state" /> |
---|
86 | </td> |
---|
87 | |
---|
88 | </tr> |
---|
89 | |
---|
90 | |
---|
91 | </tbody> |
---|
92 | </table> |
---|
93 | |
---|
94 | |
---|
95 | |
---|
96 | |
---|
97 | <div style="text-align:right;" class="group"> |
---|
98 | </div> |
---|
99 | </tal:block> |
---|
100 | |
---|
101 | </metal:block> |
---|
102 | </body> |
---|
103 | </html> |
---|