1 | <form tal:define="ds options/datastructure; |
---|
2 | advanced_search_link ds/advanced_search_link; |
---|
3 | contextual_search_choice ds/contextual_search_choice; |
---|
4 | context_is_portlet ds/context_is_portlet; |
---|
5 | utool nocall:here/portal_url; |
---|
6 | params here/getSearchFormParams; |
---|
7 | search_script params/script; |
---|
8 | context nocall:options/context_obj; |
---|
9 | contextual_search params/contextual; |
---|
10 | advanced_search_form params/advanced; |
---|
11 | folder_prefix request/folder_prefix|nothing; |
---|
12 | cpsmcat nocall:here/translation_service; |
---|
13 | value_search |
---|
14 | request/SearchableText|python:cpsmcat('button_search'); |
---|
15 | base_url python:request.get('cpsskins_base_url');" |
---|
16 | method="get" action="" |
---|
17 | tal:attributes="action search_script" |
---|
18 | onsubmit="return checkEmptySearch(this)"> |
---|
19 | <div tal:condition="python:contextual_search_choice and contextual_search" |
---|
20 | tal:define="id here/getId; id1 string:${id}1; id2 string:${id}2"> |
---|
21 | <tal:block condition="not:context_is_portlet"> |
---|
22 | <label tal:attributes="for id1" |
---|
23 | i18n:translate="label_search_here">here</label> |
---|
24 | <input type="radio" name="folder_prefix" |
---|
25 | tal:attributes="id id1; checked folder_prefix; |
---|
26 | value python:utool.getRelativeUrl(context)" /> |
---|
27 | <label tal:attributes="for id2" |
---|
28 | i18n:translate="label_search_all_site">here</label> |
---|
29 | <input type="radio" name="folder_prefix" value="" |
---|
30 | tal:attributes="id id2; checked not:folder_prefix" /> |
---|
31 | </tal:block> |
---|
32 | <tal:block condition="context_is_portlet"> |
---|
33 | <p tal:define="portlet_folder here/getLocalFolder"> |
---|
34 | <input type="hidden" name="folder_prefix" |
---|
35 | tal:attributes="value python:utool.getRelativeUrl(portlet_folder)" /> |
---|
36 | <tal:block i18n:translate="">cpsportlets_search_in</tal:block> |
---|
37 | <em tal:content="portlet_folder/title_or_id" /> |
---|
38 | </p> |
---|
39 | </tal:block> |
---|
40 | </div> |
---|
41 | <div> |
---|
42 | <input id="searchGadget" type="text" name="SearchableText" size="15" |
---|
43 | value="" tal:attributes="value value_search" |
---|
44 | onclick="this.value='';"/> |
---|
45 | <input class="context searchButton" type="submit" value="button_ok" |
---|
46 | i18n:attributes="value" /> |
---|
47 | </div> |
---|
48 | <div> |
---|
49 | <a href="" tal:condition="advanced_search_link" |
---|
50 | tal:define="adv_url python:contextual_search and |
---|
51 | context.absolute_url() or utool()" |
---|
52 | i18n:translate="cpsportlets_advanced_search" |
---|
53 | tal:attributes="href string:${adv_url}/${advanced_search_form}">Advanced search</a> |
---|
54 | </div> |
---|
55 | </form> |
---|