Wiki source code of ListWebSearch

Version 419.1 by Ecaterina Valica on 2009/04/09 17:08

Show last authors
1 $xwiki.ssx.use("Main.ListWebSearch")
2
3 #if(!$request.space)
4 #set($space = "All")
5 #else
6 #set($space = $request.space)
7 #end
8 #set($spacesText = {})
9 #set($spaces = $xwiki.spaces)
10 #set($ok = $spacesText.put("All","All"))
11 #foreach($space in $spaces)
12 #set($ok = $spacesText.put($space,$space))
13 #end
14
15 #macro(spaceoption $space $selectspace $spacesText)
16 <option value="$spacesText.get($space)" #if($selectspace == $spacesText.get($space))selected="selected"#end>$space</option>
17 #end
18 #macro(spaceselect $selectspace $spaces $spacesText)
19 <select name="space" title="$msg.get('xe.search.bar.spaces.title')">
20 #spaceoption("All spaces" $selectspace $spacesText)
21 #foreach($space in $spaces)
22 #spaceoption($space $selectspace $spacesText)
23 #end
24 </select>
25 #end
26 ##
27 ##
28 #set($text = "$!request.getParameter('text')")
29 #set($utext = $util.encodeURI($text))
30 #if($space == "All")
31 #set($url = $xwiki.getURL("Main.WebSearchRss", "view", "xpage=rdf&amp;text=${utext}" ))
32 #else
33 #set($url = $xwiki.getURL("Main.WebSearchRss", "view", "xpage=rdf&space=$space&text=${utext}"))
34 #end
35 <div id="search">
36 <form action="" id="searchBar">
37 {pre}
38 <input type="text" name="text" class="searchQuery" value="$msg.get("xe.search.bar.query")" title="$msg.get('xe.search.bar.query.title')"/>
39 #spaceselect($space $spaces $spacesText)
40 <input type="submit" class="searchButton" value="$msg.get('xe.search.bar.go')" title="$msg.get('xe.search.bar.go.title')"/>
41 <div class="searchHelp">$msg.get("xe.search.bar.help")</div>
42 {/pre}
43 </form>
44 #includeInContext("XWiki.WebSearchCode")
45 #includeInContext("XWiki.ListSuggestions")
46 #includeInContext("XWiki.ListResults")
47 </div>