source: WAeUP_SRP/branches/uli/skins/waeup_custom/widget_portlet_search.pt @ 3682

Last change on this file since 3682 was 1067, checked in by joachim, 18 years ago

a lot of optimizations

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